blob: 2e438daf54a2ee3d0444a4e4d4cc5b7a6275079b [file] [log] [blame]
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IAdvancedMediaCapture_Impl: Sized {
fn GetAdvancedMediaCaptureSettings(&self) -> ::windows::core::Result<IAdvancedMediaCaptureSettings>;
}
impl ::windows::core::RuntimeName for IAdvancedMediaCapture {}
impl IAdvancedMediaCapture_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAdvancedMediaCapture_Impl, const OFFSET: isize>() -> IAdvancedMediaCapture_Vtbl {
unsafe extern "system" fn GetAdvancedMediaCaptureSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAdvancedMediaCapture_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAdvancedMediaCaptureSettings() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAdvancedMediaCaptureSettings: GetAdvancedMediaCaptureSettings::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IAdvancedMediaCapture as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IAdvancedMediaCaptureInitializationSettings_Impl: Sized {
fn SetDirectxDeviceManager(&self, value: ::core::option::Option<&IMFDXGIDeviceManager>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IAdvancedMediaCaptureInitializationSettings {}
impl IAdvancedMediaCaptureInitializationSettings_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAdvancedMediaCaptureInitializationSettings_Impl, const OFFSET: isize>() -> IAdvancedMediaCaptureInitializationSettings_Vtbl {
unsafe extern "system" fn SetDirectxDeviceManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAdvancedMediaCaptureInitializationSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDirectxDeviceManager(::windows::core::from_raw_borrowed(&value)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetDirectxDeviceManager: SetDirectxDeviceManager::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IAdvancedMediaCaptureInitializationSettings as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IAdvancedMediaCaptureSettings_Impl: Sized {
fn GetDirectxDeviceManager(&self) -> ::windows::core::Result<IMFDXGIDeviceManager>;
}
impl ::windows::core::RuntimeName for IAdvancedMediaCaptureSettings {}
impl IAdvancedMediaCaptureSettings_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAdvancedMediaCaptureSettings_Impl, const OFFSET: isize>() -> IAdvancedMediaCaptureSettings_Vtbl {
unsafe extern "system" fn GetDirectxDeviceManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAdvancedMediaCaptureSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDirectxDeviceManager() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetDirectxDeviceManager: GetDirectxDeviceManager::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IAdvancedMediaCaptureSettings as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IAudioSourceProvider_Impl: Sized {
fn ProvideInput(&self, dwsamplecount: u32, pdwchannelcount: *mut u32, pinterleavedaudiodata: *mut f32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IAudioSourceProvider {}
impl IAudioSourceProvider_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAudioSourceProvider_Impl, const OFFSET: isize>() -> IAudioSourceProvider_Vtbl {
unsafe extern "system" fn ProvideInput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAudioSourceProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsamplecount: u32, pdwchannelcount: *mut u32, pinterleavedaudiodata: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProvideInput(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IAudioSourceProvider as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IClusterDetector_Impl: Sized {
fn Initialize(&self, wbaseentrylevel: u16, wclusterentrylevel: u16) -> ::windows::core::Result<()>;
fn Detect(&self, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: ::core::option::Option<&IToc>) -> ::windows::core::Result<IToc>;
}
impl ::windows::core::RuntimeName for IClusterDetector {}
impl IClusterDetector_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IClusterDetector_Impl, const OFFSET: isize>() -> IClusterDetector_Vtbl {
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IClusterDetector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wbaseentrylevel: u16, wclusterentrylevel: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::core::mem::transmute_copy(&wbaseentrylevel), ::core::mem::transmute_copy(&wclusterentrylevel)).into()
}
unsafe extern "system" fn Detect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Detect(::core::mem::transmute_copy(&dwmaxnumclusters), ::core::mem::transmute_copy(&fminclusterduration), ::core::mem::transmute_copy(&fmaxclusterduration), ::windows::core::from_raw_borrowed(&psrctoc)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdsttoc, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, Impl, OFFSET>,
Detect: Detect::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IClusterDetector as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait ICodecAPI_Impl: Sized {
fn IsSupported(&self, api: *const ::windows::core::GUID) -> ::windows::core::Result<()>;
fn IsModifiable(&self, api: *const ::windows::core::GUID) -> ::windows::core::Result<()>;
fn GetParameterRange(&self, api: *const ::windows::core::GUID, valuemin: *mut super::super::System::Com::VARIANT, valuemax: *mut super::super::System::Com::VARIANT, steppingdelta: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()>;
fn GetParameterValues(&self, api: *const ::windows::core::GUID, values: *mut *mut super::super::System::Com::VARIANT, valuescount: *mut u32) -> ::windows::core::Result<()>;
fn GetDefaultValue(&self, api: *const ::windows::core::GUID) -> ::windows::core::Result<super::super::System::Com::VARIANT>;
fn GetValue(&self, api: *const ::windows::core::GUID) -> ::windows::core::Result<super::super::System::Com::VARIANT>;
fn SetValue(&self, api: *const ::windows::core::GUID, value: *const super::super::System::Com::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: *mut super::super::System::Com::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: ::core::option::Option<&super::super::System::Com::IStream>) -> ::windows::core::Result<()>;
fn SetAllSettings(&self, __midl__icodecapi0001: ::core::option::Option<&super::super::System::Com::IStream>) -> ::windows::core::Result<()>;
fn SetAllSettingsWithNotify(&self, __midl__icodecapi0002: ::core::option::Option<&super::super::System::Com::IStream>, changedparam: *mut *mut ::windows::core::GUID, changedparamcount: *mut u32) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for ICodecAPI {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ICodecAPI_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>() -> ICodecAPI_Vtbl {
unsafe extern "system" fn IsSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSupported(::core::mem::transmute_copy(&api)).into()
}
unsafe extern "system" fn IsModifiable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsModifiable(::core::mem::transmute_copy(&api)).into()
}
unsafe extern "system" fn GetParameterRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, valuemin: *mut super::super::System::Com::VARIANT, valuemax: *mut super::super::System::Com::VARIANT, steppingdelta: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetParameterRange(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, values: *mut *mut super::super::System::Com::VARIANT, valuescount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetParameterValues(::core::mem::transmute_copy(&api), ::core::mem::transmute_copy(&values), ::core::mem::transmute_copy(&valuescount)).into()
}
unsafe extern "system" fn GetDefaultValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, value: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDefaultValue(::core::mem::transmute_copy(&api)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, value: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetValue(::core::mem::transmute_copy(&api)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, value: *const super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetValue(::core::mem::transmute_copy(&api), ::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn RegisterForEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, userdata: isize) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterForEvent(::core::mem::transmute_copy(&api), ::core::mem::transmute_copy(&userdata)).into()
}
unsafe extern "system" fn UnregisterForEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnregisterForEvent(::core::mem::transmute_copy(&api)).into()
}
unsafe extern "system" fn SetAllDefaults<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllDefaults().into()
}
unsafe extern "system" fn SetValueWithNotify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, api: *const ::windows::core::GUID, value: *mut super::super::System::Com::VARIANT, changedparam: *mut *mut ::windows::core::GUID, changedparamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetValueWithNotify(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, changedparam: *mut *mut ::windows::core::GUID, changedparamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllDefaultsWithNotify(::core::mem::transmute_copy(&changedparam), ::core::mem::transmute_copy(&changedparamcount)).into()
}
unsafe extern "system" fn GetAllSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, __midl__icodecapi0000: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAllSettings(::windows::core::from_raw_borrowed(&__midl__icodecapi0000)).into()
}
unsafe extern "system" fn SetAllSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ICodecAPI_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, __midl__icodecapi0001: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllSettings(::windows::core::from_raw_borrowed(&__midl__icodecapi0001)).into()
}
unsafe extern "system" fn SetAllSettingsWithNotify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllSettingsWithNotify(::windows::core::from_raw_borrowed(&__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, Impl, OFFSET>,
IsModifiable: IsModifiable::<Identity, Impl, OFFSET>,
GetParameterRange: GetParameterRange::<Identity, Impl, OFFSET>,
GetParameterValues: GetParameterValues::<Identity, Impl, OFFSET>,
GetDefaultValue: GetDefaultValue::<Identity, Impl, OFFSET>,
GetValue: GetValue::<Identity, Impl, OFFSET>,
SetValue: SetValue::<Identity, Impl, OFFSET>,
RegisterForEvent: RegisterForEvent::<Identity, Impl, OFFSET>,
UnregisterForEvent: UnregisterForEvent::<Identity, Impl, OFFSET>,
SetAllDefaults: SetAllDefaults::<Identity, Impl, OFFSET>,
SetValueWithNotify: SetValueWithNotify::<Identity, Impl, OFFSET>,
SetAllDefaultsWithNotify: SetAllDefaultsWithNotify::<Identity, Impl, OFFSET>,
GetAllSettings: GetAllSettings::<Identity, Impl, OFFSET>,
SetAllSettings: SetAllSettings::<Identity, Impl, OFFSET>,
SetAllSettingsWithNotify: SetAllSettingsWithNotify::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICodecAPI as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList_Impl: Sized + super::super::Graphics::Direct3D12::ID3D12CommandList_Impl {
fn Close(&self) -> ::windows::core::Result<()>;
fn Reset(&self, pallocator: ::core::option::Option<&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: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION);
fn BeginQuery(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn EndQuery(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn ResolveQueryData(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64);
fn SetPredication(&self, pbuffer: ::core::option::Option<&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: ::core::option::Option<&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_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDecodeCommandList {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>() -> ID3D12VideoDecodeCommandList_Vtbl {
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pallocator: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset(::windows::core::from_raw_borrowed(&pallocator)).into()
}
unsafe extern "system" fn ClearState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearState()
}
unsafe extern "system" fn ResourceBarrier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResourceBarrier(::core::mem::transmute_copy(&numbarriers), ::core::mem::transmute_copy(&pbarriers))
}
unsafe extern "system" fn DiscardResource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DiscardResource(::windows::core::from_raw_borrowed(&presource), ::core::mem::transmute_copy(&pregion))
}
unsafe extern "system" fn BeginQuery<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginQuery(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn EndQuery<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndQuery(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn ResolveQueryData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResolveQueryData(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&startindex), ::core::mem::transmute_copy(&numqueries), ::windows::core::from_raw_borrowed(&pdestinationbuffer), ::core::mem::transmute_copy(&aligneddestinationbufferoffset))
}
unsafe extern "system" fn SetPredication<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPredication(::windows::core::from_raw_borrowed(&pbuffer), ::core::mem::transmute_copy(&alignedbufferoffset), ::core::mem::transmute_copy(&operation))
}
unsafe extern "system" fn SetMarker<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadata: u32, pdata: *const ::core::ffi::c_void, size: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarker(::core::mem::transmute_copy(&metadata), ::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&size))
}
unsafe extern "system" fn BeginEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadata: u32, pdata: *const ::core::ffi::c_void, size: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginEvent(::core::mem::transmute_copy(&metadata), ::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&size))
}
unsafe extern "system" fn EndEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndEvent()
}
unsafe extern "system" fn DecodeFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DecodeFrame(::windows::core::from_raw_borrowed(&pdecoder), ::core::mem::transmute_copy(&poutputarguments), ::core::mem::transmute_copy(&pinputarguments))
}
unsafe extern "system" fn WriteBufferImmediate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WriteBufferImmediate(::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, Impl, OFFSET>(),
Close: Close::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
ClearState: ClearState::<Identity, Impl, OFFSET>,
ResourceBarrier: ResourceBarrier::<Identity, Impl, OFFSET>,
DiscardResource: DiscardResource::<Identity, Impl, OFFSET>,
BeginQuery: BeginQuery::<Identity, Impl, OFFSET>,
EndQuery: EndQuery::<Identity, Impl, OFFSET>,
ResolveQueryData: ResolveQueryData::<Identity, Impl, OFFSET>,
SetPredication: SetPredication::<Identity, Impl, OFFSET>,
SetMarker: SetMarker::<Identity, Impl, OFFSET>,
BeginEvent: BeginEvent::<Identity, Impl, OFFSET>,
EndEvent: EndEvent::<Identity, Impl, OFFSET>,
DecodeFrame: DecodeFrame::<Identity, Impl, OFFSET>,
WriteBufferImmediate: WriteBufferImmediate::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList1_Impl: Sized + ID3D12VideoDecodeCommandList_Impl {
fn DecodeFrame1(&self, pdecoder: ::core::option::Option<&ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDecodeCommandList1 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList1_Impl, const OFFSET: isize>() -> ID3D12VideoDecodeCommandList1_Vtbl {
unsafe extern "system" fn DecodeFrame1<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DecodeFrame1(::windows::core::from_raw_borrowed(&pdecoder), ::core::mem::transmute_copy(&poutputarguments), ::core::mem::transmute_copy(&pinputarguments))
}
Self { base__: ID3D12VideoDecodeCommandList_Vtbl::new::<Identity, Impl, OFFSET>(), DecodeFrame1: DecodeFrame1::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList1 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecodeCommandList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList2_Impl: Sized + ID3D12VideoDecodeCommandList1_Impl {
fn SetProtectedResourceSession(&self, pprotectedresourcesession: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>);
fn InitializeExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pinitializationparameters: *const ::core::ffi::c_void, initializationparameterssizeinbytes: usize);
fn ExecuteExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const ::core::ffi::c_void, executionparameterssizeinbytes: usize);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDecodeCommandList2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList2_Impl, const OFFSET: isize>() -> ID3D12VideoDecodeCommandList2_Vtbl {
unsafe extern "system" fn SetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprotectedresourcesession: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProtectedResourceSession(::windows::core::from_raw_borrowed(&pprotectedresourcesession))
}
unsafe extern "system" fn InitializeExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeExtensionCommand(::windows::core::from_raw_borrowed(&pextensioncommand), ::core::mem::transmute_copy(&pinitializationparameters), ::core::mem::transmute_copy(&initializationparameterssizeinbytes))
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExecuteExtensionCommand(::windows::core::from_raw_borrowed(&pextensioncommand), ::core::mem::transmute_copy(&pexecutionparameters), ::core::mem::transmute_copy(&executionparameterssizeinbytes))
}
Self {
base__: ID3D12VideoDecodeCommandList1_Vtbl::new::<Identity, Impl, OFFSET>(),
SetProtectedResourceSession: SetProtectedResourceSession::<Identity, Impl, OFFSET>,
InitializeExtensionCommand: InitializeExtensionCommand::<Identity, Impl, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList2 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecodeCommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecodeCommandList1 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList3_Impl: Sized + ID3D12VideoDecodeCommandList2_Impl {
fn Barrier(&self, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDecodeCommandList3 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList3_Impl, const OFFSET: isize>() -> ID3D12VideoDecodeCommandList3_Vtbl {
unsafe extern "system" fn Barrier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecodeCommandList3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Barrier(::core::mem::transmute_copy(&numbarriergroups), ::core::mem::transmute_copy(&pbarriergroups))
}
Self { base__: ID3D12VideoDecodeCommandList2_Vtbl::new::<Identity, Impl, OFFSET>(), Barrier: Barrier::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList3 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecodeCommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecodeCommandList1 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecodeCommandList2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoDecoder_Impl: Sized + super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetDesc(&self) -> D3D12_VIDEO_DECODER_DESC;
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ::windows::core::RuntimeName for ID3D12VideoDecoder {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoder_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecoder_Impl, const OFFSET: isize>() -> ID3D12VideoDecoder_Vtbl {
unsafe extern "system" fn GetDesc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut D3D12_VIDEO_DECODER_DESC) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
*result__ = this.GetDesc()
}
Self { base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(), GetDesc: GetDesc::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecoder as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoDecoder1_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoDecoder1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoder1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecoder1_Impl, const OFFSET: isize>() -> ID3D12VideoDecoder1_Vtbl {
unsafe extern "system" fn GetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectedResourceSession(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppprotectedsession)).into()
}
Self {
base__: ID3D12VideoDecoder_Vtbl::new::<Identity, Impl, OFFSET>(),
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecoder1 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecoder as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecoderHeap_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoDecoderHeap {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecoderHeap_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecoderHeap_Impl, const OFFSET: isize>() -> ID3D12VideoDecoderHeap_Vtbl {
unsafe extern "system" fn GetDesc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut D3D12_VIDEO_DECODER_HEAP_DESC) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
*result__ = this.GetDesc()
}
Self { base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(), GetDesc: GetDesc::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecoderHeap as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecoderHeap1_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoDecoderHeap1 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecoderHeap1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDecoderHeap1_Impl, const OFFSET: isize>() -> ID3D12VideoDecoderHeap1_Vtbl {
unsafe extern "system" fn GetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectedResourceSession(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppprotectedsession)).into()
}
Self {
base__: ID3D12VideoDecoderHeap_Vtbl::new::<Identity, Impl, OFFSET>(),
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDecoderHeap1 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDecoderHeap as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice_Impl: Sized {
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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDevice {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDevice_Impl, const OFFSET: isize>() -> ID3D12VideoDevice_Vtbl {
unsafe extern "system" fn CheckFeatureSupport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CheckFeatureSupport(::core::mem::transmute_copy(&featurevideo), ::core::mem::transmute_copy(&pfeaturesupportdata), ::core::mem::transmute_copy(&featuresupportdatasize)).into()
}
unsafe extern "system" fn CreateVideoDecoder<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoDecoder(::core::mem::transmute_copy(&pdesc), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideodecoder)).into()
}
unsafe extern "system" fn CreateVideoDecoderHeap<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoDecoderHeap(::core::mem::transmute_copy(&pvideodecoderheapdesc), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideodecoderheap)).into()
}
unsafe extern "system" fn CreateVideoProcessor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoProcessor(::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, Impl, OFFSET>,
CreateVideoDecoder: CreateVideoDecoder::<Identity, Impl, OFFSET>,
CreateVideoDecoderHeap: CreateVideoDecoderHeap::<Identity, Impl, OFFSET>,
CreateVideoProcessor: CreateVideoProcessor::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDevice as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice1_Impl: Sized + ID3D12VideoDevice_Impl {
fn CreateVideoMotionEstimator(&self, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: ::core::option::Option<&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: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const ::windows::core::GUID, ppvideomotionvectorheap: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDevice1 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDevice1_Impl, const OFFSET: isize>() -> ID3D12VideoDevice1_Vtbl {
unsafe extern "system" fn CreateVideoMotionEstimator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoMotionEstimator(::core::mem::transmute_copy(&pdesc), ::windows::core::from_raw_borrowed(&pprotectedresourcesession), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideomotionestimator)).into()
}
unsafe extern "system" fn CreateVideoMotionVectorHeap<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoMotionVectorHeap(::core::mem::transmute_copy(&pdesc), ::windows::core::from_raw_borrowed(&pprotectedresourcesession), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideomotionvectorheap)).into()
}
Self {
base__: ID3D12VideoDevice_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateVideoMotionEstimator: CreateVideoMotionEstimator::<Identity, Impl, OFFSET>,
CreateVideoMotionVectorHeap: CreateVideoMotionVectorHeap::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDevice1 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDevice as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice2_Impl: Sized + ID3D12VideoDevice1_Impl {
fn CreateVideoDecoder1(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: ::core::option::Option<&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: ::core::option::Option<&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: ::core::option::Option<&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: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const ::windows::core::GUID, ppvideoextensioncommand: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
fn ExecuteExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const ::core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut ::core::ffi::c_void, outputdatasizeinbytes: usize) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDevice2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDevice2_Impl, const OFFSET: isize>() -> ID3D12VideoDevice2_Vtbl {
unsafe extern "system" fn CreateVideoDecoder1<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoDecoder1(::core::mem::transmute_copy(&pdesc), ::windows::core::from_raw_borrowed(&pprotectedresourcesession), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideodecoder)).into()
}
unsafe extern "system" fn CreateVideoDecoderHeap1<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoDecoderHeap1(::core::mem::transmute_copy(&pvideodecoderheapdesc), ::windows::core::from_raw_borrowed(&pprotectedresourcesession), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideodecoderheap)).into()
}
unsafe extern "system" fn CreateVideoProcessor1<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoProcessor1(::core::mem::transmute_copy(&nodemask), ::core::mem::transmute_copy(&poutputstreamdesc), ::core::mem::transmute_copy(&numinputstreamdescs), ::core::mem::transmute_copy(&pinputstreamdescs), ::windows::core::from_raw_borrowed(&pprotectedresourcesession), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideoprocessor)).into()
}
unsafe extern "system" fn CreateVideoExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoExtensionCommand(::core::mem::transmute_copy(&pdesc), ::core::mem::transmute_copy(&pcreationparameters), ::core::mem::transmute_copy(&creationparametersdatasizeinbytes), ::windows::core::from_raw_borrowed(&pprotectedresourcesession), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideoextensioncommand)).into()
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExecuteExtensionCommand(::windows::core::from_raw_borrowed(&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, Impl, OFFSET>(),
CreateVideoDecoder1: CreateVideoDecoder1::<Identity, Impl, OFFSET>,
CreateVideoDecoderHeap1: CreateVideoDecoderHeap1::<Identity, Impl, OFFSET>,
CreateVideoProcessor1: CreateVideoProcessor1::<Identity, Impl, OFFSET>,
CreateVideoExtensionCommand: CreateVideoExtensionCommand::<Identity, Impl, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDevice2 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDevice as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDevice1 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice3_Impl: Sized + 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_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoDevice3 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoDevice3_Impl, const OFFSET: isize>() -> ID3D12VideoDevice3_Vtbl {
unsafe extern "system" fn CreateVideoEncoder<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoEncoder(::core::mem::transmute_copy(&pdesc), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideoencoder)).into()
}
unsafe extern "system" fn CreateVideoEncoderHeap<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoEncoderHeap(::core::mem::transmute_copy(&pdesc), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvideoencoderheap)).into()
}
Self {
base__: ID3D12VideoDevice2_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateVideoEncoder: CreateVideoEncoder::<Identity, Impl, OFFSET>,
CreateVideoEncoderHeap: CreateVideoEncoderHeap::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoDevice3 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDevice as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDevice1 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoDevice2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait ID3D12VideoEncodeCommandList_Impl: Sized + super::super::Graphics::Direct3D12::ID3D12CommandList_Impl {
fn Close(&self) -> ::windows::core::Result<()>;
fn Reset(&self, pallocator: ::core::option::Option<&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: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION);
fn BeginQuery(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn EndQuery(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn ResolveQueryData(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64);
fn SetPredication(&self, pbuffer: ::core::option::Option<&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: ::core::option::Option<&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: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for ID3D12VideoEncodeCommandList {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ID3D12VideoEncodeCommandList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>() -> ID3D12VideoEncodeCommandList_Vtbl {
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pallocator: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset(::windows::core::from_raw_borrowed(&pallocator)).into()
}
unsafe extern "system" fn ClearState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearState()
}
unsafe extern "system" fn ResourceBarrier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResourceBarrier(::core::mem::transmute_copy(&numbarriers), ::core::mem::transmute_copy(&pbarriers))
}
unsafe extern "system" fn DiscardResource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DiscardResource(::windows::core::from_raw_borrowed(&presource), ::core::mem::transmute_copy(&pregion))
}
unsafe extern "system" fn BeginQuery<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginQuery(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn EndQuery<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndQuery(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn ResolveQueryData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResolveQueryData(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&startindex), ::core::mem::transmute_copy(&numqueries), ::windows::core::from_raw_borrowed(&pdestinationbuffer), ::core::mem::transmute_copy(&aligneddestinationbufferoffset))
}
unsafe extern "system" fn SetPredication<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPredication(::windows::core::from_raw_borrowed(&pbuffer), ::core::mem::transmute_copy(&alignedbufferoffset), ::core::mem::transmute_copy(&operation))
}
unsafe extern "system" fn SetMarker<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadata: u32, pdata: *const ::core::ffi::c_void, size: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarker(::core::mem::transmute_copy(&metadata), ::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&size))
}
unsafe extern "system" fn BeginEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadata: u32, pdata: *const ::core::ffi::c_void, size: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginEvent(::core::mem::transmute_copy(&metadata), ::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&size))
}
unsafe extern "system" fn EndEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndEvent()
}
unsafe extern "system" fn EstimateMotion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EstimateMotion(::windows::core::from_raw_borrowed(&pmotionestimator), ::core::mem::transmute_copy(&poutputarguments), ::core::mem::transmute_copy(&pinputarguments))
}
unsafe extern "system" fn ResolveMotionVectorHeap<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResolveMotionVectorHeap(::core::mem::transmute_copy(&poutputarguments), ::core::mem::transmute_copy(&pinputarguments))
}
unsafe extern "system" fn WriteBufferImmediate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WriteBufferImmediate(::core::mem::transmute_copy(&count), ::core::mem::transmute_copy(&pparams), ::core::mem::transmute_copy(&pmodes))
}
unsafe extern "system" fn SetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprotectedresourcesession: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProtectedResourceSession(::windows::core::from_raw_borrowed(&pprotectedresourcesession))
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl::new::<Identity, Impl, OFFSET>(),
Close: Close::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
ClearState: ClearState::<Identity, Impl, OFFSET>,
ResourceBarrier: ResourceBarrier::<Identity, Impl, OFFSET>,
DiscardResource: DiscardResource::<Identity, Impl, OFFSET>,
BeginQuery: BeginQuery::<Identity, Impl, OFFSET>,
EndQuery: EndQuery::<Identity, Impl, OFFSET>,
ResolveQueryData: ResolveQueryData::<Identity, Impl, OFFSET>,
SetPredication: SetPredication::<Identity, Impl, OFFSET>,
SetMarker: SetMarker::<Identity, Impl, OFFSET>,
BeginEvent: BeginEvent::<Identity, Impl, OFFSET>,
EndEvent: EndEvent::<Identity, Impl, OFFSET>,
EstimateMotion: EstimateMotion::<Identity, Impl, OFFSET>,
ResolveMotionVectorHeap: ResolveMotionVectorHeap::<Identity, Impl, OFFSET>,
WriteBufferImmediate: WriteBufferImmediate::<Identity, Impl, OFFSET>,
SetProtectedResourceSession: SetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait ID3D12VideoEncodeCommandList1_Impl: Sized + ID3D12VideoEncodeCommandList_Impl {
fn InitializeExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pinitializationparameters: *const ::core::ffi::c_void, initializationparameterssizeinbytes: usize);
fn ExecuteExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const ::core::ffi::c_void, executionparameterssizeinbytes: usize);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for ID3D12VideoEncodeCommandList1 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ID3D12VideoEncodeCommandList1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList1_Impl, const OFFSET: isize>() -> ID3D12VideoEncodeCommandList1_Vtbl {
unsafe extern "system" fn InitializeExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeExtensionCommand(::windows::core::from_raw_borrowed(&pextensioncommand), ::core::mem::transmute_copy(&pinitializationparameters), ::core::mem::transmute_copy(&initializationparameterssizeinbytes))
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExecuteExtensionCommand(::windows::core::from_raw_borrowed(&pextensioncommand), ::core::mem::transmute_copy(&pexecutionparameters), ::core::mem::transmute_copy(&executionparameterssizeinbytes))
}
Self {
base__: ID3D12VideoEncodeCommandList_Vtbl::new::<Identity, Impl, OFFSET>(),
InitializeExtensionCommand: InitializeExtensionCommand::<Identity, Impl, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList1 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoEncodeCommandList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoEncodeCommandList2_Impl: Sized + ID3D12VideoEncodeCommandList1_Impl {
fn EncodeFrame(&self, pencoder: ::core::option::Option<&ID3D12VideoEncoder>, pheap: ::core::option::Option<&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_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoEncodeCommandList2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoEncodeCommandList2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList2_Impl, const OFFSET: isize>() -> ID3D12VideoEncodeCommandList2_Vtbl {
unsafe extern "system" fn EncodeFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EncodeFrame(::windows::core::from_raw_borrowed(&pencoder), ::windows::core::from_raw_borrowed(&pheap), ::core::mem::transmute_copy(&pinputarguments), ::core::mem::transmute_copy(&poutputarguments))
}
unsafe extern "system" fn ResolveEncoderOutputMetadata<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResolveEncoderOutputMetadata(::core::mem::transmute_copy(&pinputarguments), ::core::mem::transmute_copy(&poutputarguments))
}
Self {
base__: ID3D12VideoEncodeCommandList1_Vtbl::new::<Identity, Impl, OFFSET>(),
EncodeFrame: EncodeFrame::<Identity, Impl, OFFSET>,
ResolveEncoderOutputMetadata: ResolveEncoderOutputMetadata::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList2 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoEncodeCommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoEncodeCommandList1 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoEncodeCommandList3_Impl: Sized + ID3D12VideoEncodeCommandList2_Impl {
fn Barrier(&self, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoEncodeCommandList3 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoEncodeCommandList3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList3_Impl, const OFFSET: isize>() -> ID3D12VideoEncodeCommandList3_Vtbl {
unsafe extern "system" fn Barrier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncodeCommandList3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Barrier(::core::mem::transmute_copy(&numbarriergroups), ::core::mem::transmute_copy(&pbarriergroups))
}
Self { base__: ID3D12VideoEncodeCommandList2_Vtbl::new::<Identity, Impl, OFFSET>(), Barrier: Barrier::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList3 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoEncodeCommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoEncodeCommandList1 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoEncodeCommandList2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoEncoder_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoEncoder {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoEncoder_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>() -> ID3D12VideoEncoder_Vtbl {
unsafe extern "system" fn GetNodeMask<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNodeMask()
}
unsafe extern "system" fn GetEncoderFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> D3D12_VIDEO_ENCODER_FLAGS {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEncoderFlags()
}
unsafe extern "system" fn GetCodec<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> D3D12_VIDEO_ENCODER_CODEC {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodec()
}
unsafe extern "system" fn GetCodecProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dstprofile: D3D12_VIDEO_ENCODER_PROFILE_DESC) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodecProfile(::core::mem::transmute(&dstprofile)).into()
}
unsafe extern "system" fn GetCodecConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dstcodecconfig: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodecConfiguration(::core::mem::transmute(&dstcodecconfig)).into()
}
unsafe extern "system" fn GetInputFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Graphics::Dxgi::Common::DXGI_FORMAT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetInputFormat()
}
unsafe extern "system" fn GetMaxMotionEstimationPrecision<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetMaxMotionEstimationPrecision()
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(),
GetNodeMask: GetNodeMask::<Identity, Impl, OFFSET>,
GetEncoderFlags: GetEncoderFlags::<Identity, Impl, OFFSET>,
GetCodec: GetCodec::<Identity, Impl, OFFSET>,
GetCodecProfile: GetCodecProfile::<Identity, Impl, OFFSET>,
GetCodecConfiguration: GetCodecConfiguration::<Identity, Impl, OFFSET>,
GetInputFormat: GetInputFormat::<Identity, Impl, OFFSET>,
GetMaxMotionEstimationPrecision: GetMaxMotionEstimationPrecision::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoEncoder as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoEncoderHeap_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoEncoderHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncoderHeap_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>() -> ID3D12VideoEncoderHeap_Vtbl {
unsafe extern "system" fn GetNodeMask<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNodeMask()
}
unsafe extern "system" fn GetEncoderHeapFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> D3D12_VIDEO_ENCODER_HEAP_FLAGS {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEncoderHeapFlags()
}
unsafe extern "system" fn GetCodec<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> D3D12_VIDEO_ENCODER_CODEC {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodec()
}
unsafe extern "system" fn GetCodecProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dstprofile: D3D12_VIDEO_ENCODER_PROFILE_DESC) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodecProfile(::core::mem::transmute(&dstprofile)).into()
}
unsafe extern "system" fn GetCodecLevel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dstlevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodecLevel(::core::mem::transmute(&dstlevel)).into()
}
unsafe extern "system" fn GetResolutionListCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetResolutionListCount()
}
unsafe extern "system" fn GetResolutionList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, resolutionslistcount: u32, presolutionlist: *mut D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetResolutionList(::core::mem::transmute_copy(&resolutionslistcount), ::core::mem::transmute_copy(&presolutionlist)).into()
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(),
GetNodeMask: GetNodeMask::<Identity, Impl, OFFSET>,
GetEncoderHeapFlags: GetEncoderHeapFlags::<Identity, Impl, OFFSET>,
GetCodec: GetCodec::<Identity, Impl, OFFSET>,
GetCodecProfile: GetCodecProfile::<Identity, Impl, OFFSET>,
GetCodecLevel: GetCodecLevel::<Identity, Impl, OFFSET>,
GetResolutionListCount: GetResolutionListCount::<Identity, Impl, OFFSET>,
GetResolutionList: GetResolutionList::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoEncoderHeap as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoExtensionCommand_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoExtensionCommand {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoExtensionCommand_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoExtensionCommand_Impl, const OFFSET: isize>() -> ID3D12VideoExtensionCommand_Vtbl {
unsafe extern "system" fn GetDesc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoExtensionCommand_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut D3D12_VIDEO_EXTENSION_COMMAND_DESC) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
*result__ = this.GetDesc()
}
unsafe extern "system" fn GetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectedResourceSession(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppprotectedsession)).into()
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(),
GetDesc: GetDesc::<Identity, Impl, OFFSET>,
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoExtensionCommand as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoMotionEstimator_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoMotionEstimator {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoMotionEstimator_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoMotionEstimator_Impl, const OFFSET: isize>() -> ID3D12VideoMotionEstimator_Vtbl {
unsafe extern "system" fn GetDesc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoMotionEstimator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut D3D12_VIDEO_MOTION_ESTIMATOR_DESC) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
*result__ = this.GetDesc()
}
unsafe extern "system" fn GetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectedResourceSession(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppprotectedsession)).into()
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(),
GetDesc: GetDesc::<Identity, Impl, OFFSET>,
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoMotionEstimator as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoMotionVectorHeap_Impl: Sized + 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 ::windows::core::RuntimeName for ID3D12VideoMotionVectorHeap {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoMotionVectorHeap_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoMotionVectorHeap_Impl, const OFFSET: isize>() -> ID3D12VideoMotionVectorHeap_Vtbl {
unsafe extern "system" fn GetDesc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoMotionVectorHeap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
*result__ = this.GetDesc()
}
unsafe extern "system" fn GetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectedResourceSession(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppprotectedsession)).into()
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(),
GetDesc: GetDesc::<Identity, Impl, OFFSET>,
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoMotionVectorHeap as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait ID3D12VideoProcessCommandList_Impl: Sized + super::super::Graphics::Direct3D12::ID3D12CommandList_Impl {
fn Close(&self) -> ::windows::core::Result<()>;
fn Reset(&self, pallocator: ::core::option::Option<&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: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION);
fn BeginQuery(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn EndQuery(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn ResolveQueryData(&self, pqueryheap: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64);
fn SetPredication(&self, pbuffer: ::core::option::Option<&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: ::core::option::Option<&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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for ID3D12VideoProcessCommandList {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ID3D12VideoProcessCommandList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>() -> ID3D12VideoProcessCommandList_Vtbl {
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pallocator: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset(::windows::core::from_raw_borrowed(&pallocator)).into()
}
unsafe extern "system" fn ClearState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearState()
}
unsafe extern "system" fn ResourceBarrier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResourceBarrier(::core::mem::transmute_copy(&numbarriers), ::core::mem::transmute_copy(&pbarriers))
}
unsafe extern "system" fn DiscardResource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DiscardResource(::windows::core::from_raw_borrowed(&presource), ::core::mem::transmute_copy(&pregion))
}
unsafe extern "system" fn BeginQuery<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginQuery(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn EndQuery<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndQuery(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn ResolveQueryData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResolveQueryData(::windows::core::from_raw_borrowed(&pqueryheap), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&startindex), ::core::mem::transmute_copy(&numqueries), ::windows::core::from_raw_borrowed(&pdestinationbuffer), ::core::mem::transmute_copy(&aligneddestinationbufferoffset))
}
unsafe extern "system" fn SetPredication<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPredication(::windows::core::from_raw_borrowed(&pbuffer), ::core::mem::transmute_copy(&alignedbufferoffset), ::core::mem::transmute_copy(&operation))
}
unsafe extern "system" fn SetMarker<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadata: u32, pdata: *const ::core::ffi::c_void, size: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarker(::core::mem::transmute_copy(&metadata), ::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&size))
}
unsafe extern "system" fn BeginEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadata: u32, pdata: *const ::core::ffi::c_void, size: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginEvent(::core::mem::transmute_copy(&metadata), ::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&size))
}
unsafe extern "system" fn EndEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndEvent()
}
unsafe extern "system" fn ProcessFrames<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessFrames(::windows::core::from_raw_borrowed(&pvideoprocessor), ::core::mem::transmute_copy(&poutputarguments), ::core::mem::transmute_copy(&numinputstreams), ::core::mem::transmute_copy(&pinputarguments))
}
unsafe extern "system" fn WriteBufferImmediate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WriteBufferImmediate(::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, Impl, OFFSET>(),
Close: Close::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
ClearState: ClearState::<Identity, Impl, OFFSET>,
ResourceBarrier: ResourceBarrier::<Identity, Impl, OFFSET>,
DiscardResource: DiscardResource::<Identity, Impl, OFFSET>,
BeginQuery: BeginQuery::<Identity, Impl, OFFSET>,
EndQuery: EndQuery::<Identity, Impl, OFFSET>,
ResolveQueryData: ResolveQueryData::<Identity, Impl, OFFSET>,
SetPredication: SetPredication::<Identity, Impl, OFFSET>,
SetMarker: SetMarker::<Identity, Impl, OFFSET>,
BeginEvent: BeginEvent::<Identity, Impl, OFFSET>,
EndEvent: EndEvent::<Identity, Impl, OFFSET>,
ProcessFrames: ProcessFrames::<Identity, Impl, OFFSET>,
WriteBufferImmediate: WriteBufferImmediate::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait ID3D12VideoProcessCommandList1_Impl: Sized + ID3D12VideoProcessCommandList_Impl {
fn ProcessFrames1(&self, pvideoprocessor: ::core::option::Option<&ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for ID3D12VideoProcessCommandList1 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ID3D12VideoProcessCommandList1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList1_Impl, const OFFSET: isize>() -> ID3D12VideoProcessCommandList1_Vtbl {
unsafe extern "system" fn ProcessFrames1<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessFrames1(::windows::core::from_raw_borrowed(&pvideoprocessor), ::core::mem::transmute_copy(&poutputarguments), ::core::mem::transmute_copy(&numinputstreams), ::core::mem::transmute_copy(&pinputarguments))
}
Self { base__: ID3D12VideoProcessCommandList_Vtbl::new::<Identity, Impl, OFFSET>(), ProcessFrames1: ProcessFrames1::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList1 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessCommandList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait ID3D12VideoProcessCommandList2_Impl: Sized + ID3D12VideoProcessCommandList1_Impl {
fn SetProtectedResourceSession(&self, pprotectedresourcesession: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>);
fn InitializeExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pinitializationparameters: *const ::core::ffi::c_void, initializationparameterssizeinbytes: usize);
fn ExecuteExtensionCommand(&self, pextensioncommand: ::core::option::Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const ::core::ffi::c_void, executionparameterssizeinbytes: usize);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for ID3D12VideoProcessCommandList2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ID3D12VideoProcessCommandList2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList2_Impl, const OFFSET: isize>() -> ID3D12VideoProcessCommandList2_Vtbl {
unsafe extern "system" fn SetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprotectedresourcesession: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProtectedResourceSession(::windows::core::from_raw_borrowed(&pprotectedresourcesession))
}
unsafe extern "system" fn InitializeExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeExtensionCommand(::windows::core::from_raw_borrowed(&pextensioncommand), ::core::mem::transmute_copy(&pinitializationparameters), ::core::mem::transmute_copy(&initializationparameterssizeinbytes))
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExecuteExtensionCommand(::windows::core::from_raw_borrowed(&pextensioncommand), ::core::mem::transmute_copy(&pexecutionparameters), ::core::mem::transmute_copy(&executionparameterssizeinbytes))
}
Self {
base__: ID3D12VideoProcessCommandList1_Vtbl::new::<Identity, Impl, OFFSET>(),
SetProtectedResourceSession: SetProtectedResourceSession::<Identity, Impl, OFFSET>,
InitializeExtensionCommand: InitializeExtensionCommand::<Identity, Impl, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList2 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessCommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessCommandList1 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait ID3D12VideoProcessCommandList3_Impl: Sized + ID3D12VideoProcessCommandList2_Impl {
fn Barrier(&self, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP);
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for ID3D12VideoProcessCommandList3 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ID3D12VideoProcessCommandList3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList3_Impl, const OFFSET: isize>() -> ID3D12VideoProcessCommandList3_Vtbl {
unsafe extern "system" fn Barrier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessCommandList3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Barrier(::core::mem::transmute_copy(&numbarriergroups), ::core::mem::transmute_copy(&pbarriergroups))
}
Self { base__: ID3D12VideoProcessCommandList2_Vtbl::new::<Identity, Impl, OFFSET>(), Barrier: Barrier::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList3 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessCommandList as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessCommandList1 as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessCommandList2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoProcessor_Impl: Sized + 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_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoProcessor {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoProcessor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessor_Impl, const OFFSET: isize>() -> ID3D12VideoProcessor_Vtbl {
unsafe extern "system" fn GetNodeMask<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNodeMask()
}
unsafe extern "system" fn GetNumInputStreamDescs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNumInputStreamDescs()
}
unsafe extern "system" fn GetInputStreamDescs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, numinputstreamdescs: u32, pinputstreamdescs: *mut D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetInputStreamDescs(::core::mem::transmute_copy(&numinputstreamdescs), ::core::mem::transmute_copy(&pinputstreamdescs)).into()
}
unsafe extern "system" fn GetOutputStreamDesc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
*result__ = this.GetOutputStreamDesc()
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, Impl, OFFSET>(),
GetNodeMask: GetNodeMask::<Identity, Impl, OFFSET>,
GetNumInputStreamDescs: GetNumInputStreamDescs::<Identity, Impl, OFFSET>,
GetInputStreamDescs: GetInputStreamDescs::<Identity, Impl, OFFSET>,
GetOutputStreamDesc: GetOutputStreamDesc::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoProcessor as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoProcessor1_Impl: Sized + ID3D12VideoProcessor_Impl {
fn GetProtectedResourceSession(&self, riid: *const ::windows::core::GUID, ppprotectedsession: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ::windows::core::RuntimeName for ID3D12VideoProcessor1 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoProcessor1_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ID3D12VideoProcessor1_Impl, const OFFSET: isize>() -> ID3D12VideoProcessor1_Vtbl {
unsafe extern "system" fn GetProtectedResourceSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectedResourceSession(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppprotectedsession)).into()
}
Self {
base__: ID3D12VideoProcessor_Vtbl::new::<Identity, Impl, OFFSET>(),
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ID3D12VideoProcessor1 as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as ::windows::core::ComInterface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as ::windows::core::ComInterface>::IID || iid == &<ID3D12VideoProcessor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDXVAHD_Device_Impl: Sized {
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 ::core::option::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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDXVAHD_Device {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDXVAHD_Device_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_Device_Impl, const OFFSET: isize>() -> IDXVAHD_Device_Vtbl {
unsafe extern "system" fn CreateVideoSurface<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateVideoSurface(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcaps: *mut DXVAHD_VPDEVCAPS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorDeviceCaps(::core::mem::transmute_copy(&pcaps)).into()
}
unsafe extern "system" fn GetVideoProcessorOutputFormats<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorOutputFormats(::core::mem::transmute_copy(&count), ::core::mem::transmute_copy(&pformats)).into()
}
unsafe extern "system" fn GetVideoProcessorInputFormats<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorInputFormats(::core::mem::transmute_copy(&count), ::core::mem::transmute_copy(&pformats)).into()
}
unsafe extern "system" fn GetVideoProcessorCaps<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: u32, pcaps: *mut DXVAHD_VPCAPS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorCaps(::core::mem::transmute_copy(&count), ::core::mem::transmute_copy(&pcaps)).into()
}
unsafe extern "system" fn GetVideoProcessorCustomRates<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorCustomRates(::core::mem::transmute_copy(&pvpguid), ::core::mem::transmute_copy(&count), ::core::mem::transmute_copy(&prates)).into()
}
unsafe extern "system" fn GetVideoProcessorFilterRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, filter: DXVAHD_FILTER, prange: *mut DXVAHD_FILTER_RANGE_DATA) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoProcessorFilterRange(::core::mem::transmute_copy(&filter)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(prange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateVideoProcessor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateVideoProcessor(::core::mem::transmute_copy(&pvpguid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppvideoprocessor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateVideoSurface: CreateVideoSurface::<Identity, Impl, OFFSET>,
GetVideoProcessorDeviceCaps: GetVideoProcessorDeviceCaps::<Identity, Impl, OFFSET>,
GetVideoProcessorOutputFormats: GetVideoProcessorOutputFormats::<Identity, Impl, OFFSET>,
GetVideoProcessorInputFormats: GetVideoProcessorInputFormats::<Identity, Impl, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, Impl, OFFSET>,
GetVideoProcessorCustomRates: GetVideoProcessorCustomRates::<Identity, Impl, OFFSET>,
GetVideoProcessorFilterRange: GetVideoProcessorFilterRange::<Identity, Impl, OFFSET>,
CreateVideoProcessor: CreateVideoProcessor::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDXVAHD_Device as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDXVAHD_VideoProcessor_Impl: Sized {
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: ::core::option::Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDXVAHD_VideoProcessor {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDXVAHD_VideoProcessor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>() -> IDXVAHD_VideoProcessor_Vtbl {
unsafe extern "system" fn SetVideoProcessBltState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoProcessBltState(::core::mem::transmute_copy(&state), ::core::mem::transmute_copy(&datasize), ::core::mem::transmute_copy(&pdata)).into()
}
unsafe extern "system" fn GetVideoProcessBltState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessBltState(::core::mem::transmute_copy(&state), ::core::mem::transmute_copy(&datasize), ::core::mem::transmute_copy(&pdata)).into()
}
unsafe extern "system" fn SetVideoProcessStreamState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoProcessStreamState(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessStreamState(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.VideoProcessBltHD(::windows::core::from_raw_borrowed(&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, Impl, OFFSET>,
GetVideoProcessBltState: GetVideoProcessBltState::<Identity, Impl, OFFSET>,
SetVideoProcessStreamState: SetVideoProcessStreamState::<Identity, Impl, OFFSET>,
GetVideoProcessStreamState: GetVideoProcessStreamState::<Identity, Impl, OFFSET>,
VideoProcessBltHD: VideoProcessBltHD::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDXVAHD_VideoProcessor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3D9ExOverlayExtension_Impl: Sized {
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 ::windows::core::RuntimeName for IDirect3D9ExOverlayExtension {}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3D9ExOverlayExtension_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3D9ExOverlayExtension_Impl, const OFFSET: isize>() -> IDirect3D9ExOverlayExtension_Vtbl {
unsafe extern "system" fn CheckDeviceOverlayType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CheckDeviceOverlayType(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirect3D9ExOverlayExtension as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirect3DAuthenticatedChannel9_Impl: Sized {
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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirect3DAuthenticatedChannel9 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirect3DAuthenticatedChannel9_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>() -> IDirect3DAuthenticatedChannel9_Vtbl {
unsafe extern "system" fn GetCertificateSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcertificatesize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCertificateSize(::core::mem::transmute_copy(&pcertificatesize)).into()
}
unsafe extern "system" fn GetCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, certifactesize: u32, ppcertificate: *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCertificate(::core::mem::transmute_copy(&certifactesize), ::core::mem::transmute_copy(&ppcertificate)).into()
}
unsafe extern "system" fn NegotiateKeyExchange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, datasize: u32, pdata: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NegotiateKeyExchange(::core::mem::transmute_copy(&datasize), ::core::mem::transmute_copy(&pdata)).into()
}
unsafe extern "system" fn Query<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Query(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Configure(::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, Impl, OFFSET>,
GetCertificate: GetCertificate::<Identity, Impl, OFFSET>,
NegotiateKeyExchange: NegotiateKeyExchange::<Identity, Impl, OFFSET>,
Query: Query::<Identity, Impl, OFFSET>,
Configure: Configure::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirect3DAuthenticatedChannel9 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3DCryptoSession9_Impl: Sized {
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: ::core::option::Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: ::core::option::Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, dstsurfacesize: u32, piv: *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
fn DecryptionBlt(&self, psrcsurface: ::core::option::Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: ::core::option::Option<&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: ::core::option::Option<&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 ::windows::core::RuntimeName for IDirect3DCryptoSession9 {}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3DCryptoSession9_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>() -> IDirect3DCryptoSession9_Vtbl {
unsafe extern "system" fn GetCertificateSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcertificatesize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCertificateSize(::core::mem::transmute_copy(&pcertificatesize)).into()
}
unsafe extern "system" fn GetCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, certifactesize: u32, ppcertificate: *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCertificate(::core::mem::transmute_copy(&certifactesize), ::core::mem::transmute_copy(&ppcertificate)).into()
}
unsafe extern "system" fn NegotiateKeyExchange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, datasize: u32, pdata: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NegotiateKeyExchange(::core::mem::transmute_copy(&datasize), ::core::mem::transmute_copy(&pdata)).into()
}
unsafe extern "system" fn EncryptionBlt<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EncryptionBlt(::windows::core::from_raw_borrowed(&psrcsurface), ::windows::core::from_raw_borrowed(&pdstsurface), ::core::mem::transmute_copy(&dstsurfacesize), ::core::mem::transmute_copy(&piv)).into()
}
unsafe extern "system" fn DecryptionBlt<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DecryptionBlt(::windows::core::from_raw_borrowed(&psrcsurface), ::windows::core::from_raw_borrowed(&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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psrcsurface: *mut ::core::ffi::c_void, psurfacepitch: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSurfacePitch(::windows::core::from_raw_borrowed(&psrcsurface), ::core::mem::transmute_copy(&psurfacepitch)).into()
}
unsafe extern "system" fn StartSessionKeyRefresh<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, prandomnumber: *mut ::core::ffi::c_void, randomnumbersize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StartSessionKeyRefresh(::core::mem::transmute_copy(&prandomnumber), ::core::mem::transmute_copy(&randomnumbersize)).into()
}
unsafe extern "system" fn FinishSessionKeyRefresh<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FinishSessionKeyRefresh().into()
}
unsafe extern "system" fn GetEncryptionBltKey<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, preadbackkey: *mut ::core::ffi::c_void, keysize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEncryptionBltKey(::core::mem::transmute_copy(&preadbackkey), ::core::mem::transmute_copy(&keysize)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCertificateSize: GetCertificateSize::<Identity, Impl, OFFSET>,
GetCertificate: GetCertificate::<Identity, Impl, OFFSET>,
NegotiateKeyExchange: NegotiateKeyExchange::<Identity, Impl, OFFSET>,
EncryptionBlt: EncryptionBlt::<Identity, Impl, OFFSET>,
DecryptionBlt: DecryptionBlt::<Identity, Impl, OFFSET>,
GetSurfacePitch: GetSurfacePitch::<Identity, Impl, OFFSET>,
StartSessionKeyRefresh: StartSessionKeyRefresh::<Identity, Impl, OFFSET>,
FinishSessionKeyRefresh: FinishSessionKeyRefresh::<Identity, Impl, OFFSET>,
GetEncryptionBltKey: GetEncryptionBltKey::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirect3DCryptoSession9 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirect3DDevice9Video_Impl: Sized {
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: *mut ::core::option::Option<IDirect3DAuthenticatedChannel9>, pchannelhandle: *mut super::super::Foundation::HANDLE) -> ::windows::core::Result<()>;
fn CreateCryptoSession(&self, pcryptotype: *const ::windows::core::GUID, pdecodeprofile: *const ::windows::core::GUID, ppcryptosession: *mut ::core::option::Option<IDirect3DCryptoSession9>, pcryptohandle: *mut super::super::Foundation::HANDLE) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirect3DDevice9Video {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirect3DDevice9Video_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDevice9Video_Impl, const OFFSET: isize>() -> IDirect3DDevice9Video_Vtbl {
unsafe extern "system" fn GetContentProtectionCaps<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetContentProtectionCaps(::core::mem::transmute_copy(&pcryptotype), ::core::mem::transmute_copy(&pdecodeprofile), ::core::mem::transmute_copy(&pcaps)).into()
}
unsafe extern "system" fn CreateAuthenticatedChannel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateAuthenticatedChannel(::core::mem::transmute_copy(&channeltype), ::core::mem::transmute_copy(&ppauthenticatedchannel), ::core::mem::transmute_copy(&pchannelhandle)).into()
}
unsafe extern "system" fn CreateCryptoSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateCryptoSession(::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, Impl, OFFSET>,
CreateAuthenticatedChannel: CreateAuthenticatedChannel::<Identity, Impl, OFFSET>,
CreateCryptoSession: CreateCryptoSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirect3DDevice9Video as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirect3DDeviceManager9_Impl: Sized {
fn ResetDevice(&self, pdevice: ::core::option::Option<&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: *mut ::core::option::Option<super::super::Graphics::Direct3D9::IDirect3DDevice9>, fblock: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: super::super::Foundation::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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirect3DDeviceManager9 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirect3DDeviceManager9_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>() -> IDirect3DDeviceManager9_Vtbl {
unsafe extern "system" fn ResetDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdevice: *mut ::core::ffi::c_void, resettoken: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResetDevice(::windows::core::from_raw_borrowed(&pdevice), ::core::mem::transmute_copy(&resettoken)).into()
}
unsafe extern "system" fn OpenDeviceHandle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phdevice: *mut super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.OpenDeviceHandle() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phdevice, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CloseDeviceHandle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CloseDeviceHandle(::core::mem::transmute_copy(&hdevice)).into()
}
unsafe extern "system" fn TestDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TestDevice(::core::mem::transmute_copy(&hdevice)).into()
}
unsafe extern "system" fn LockDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut *mut ::core::ffi::c_void, fblock: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockDevice(::core::mem::transmute_copy(&hdevice), ::core::mem::transmute_copy(&ppdevice), ::core::mem::transmute_copy(&fblock)).into()
}
unsafe extern "system" fn UnlockDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, fsavestate: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockDevice(::core::mem::transmute_copy(&hdevice), ::core::mem::transmute_copy(&fsavestate)).into()
}
unsafe extern "system" fn GetVideoService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoService(::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, Impl, OFFSET>,
OpenDeviceHandle: OpenDeviceHandle::<Identity, Impl, OFFSET>,
CloseDeviceHandle: CloseDeviceHandle::<Identity, Impl, OFFSET>,
TestDevice: TestDevice::<Identity, Impl, OFFSET>,
LockDevice: LockDevice::<Identity, Impl, OFFSET>,
UnlockDevice: UnlockDevice::<Identity, Impl, OFFSET>,
GetVideoService: GetVideoService::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirect3DDeviceManager9 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirectXVideoAccelerationService_Impl: Sized {
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 ::core::option::Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirectXVideoAccelerationService {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirectXVideoAccelerationService_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoAccelerationService_Impl, const OFFSET: isize>() -> IDirectXVideoAccelerationService_Vtbl {
unsafe extern "system" fn CreateSurface<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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: DXVA2_VideoRenderTargetType, ppsurface: *mut *mut ::core::ffi::c_void, psharedhandle: *mut super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateSurface(::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_copy(&dxvatype), ::core::mem::transmute_copy(&ppsurface), ::core::mem::transmute_copy(&psharedhandle)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateSurface: CreateSurface::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirectXVideoAccelerationService as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirectXVideoDecoder_Impl: Sized {
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 ::core::option::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: ::core::option::Option<&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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirectXVideoDecoder {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirectXVideoDecoder_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoder_Impl, const OFFSET: isize>() -> IDirectXVideoDecoder_Vtbl {
unsafe extern "system" fn GetVideoDecoderService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppservice: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoDecoderService() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppservice, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCreationParameters<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 ::core::option::Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pnumsurfaces: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCreationParameters(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, buffertype: DXVA2_BufferfType, ppbuffer: *mut *mut ::core::ffi::c_void, pbuffersize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetBuffer(::core::mem::transmute_copy(&buffertype), ::core::mem::transmute_copy(&ppbuffer), ::core::mem::transmute_copy(&pbuffersize)).into()
}
unsafe extern "system" fn ReleaseBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, buffertype: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ReleaseBuffer(::core::mem::transmute_copy(&buffertype)).into()
}
unsafe extern "system" fn BeginFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginFrame(::windows::core::from_raw_borrowed(&prendertarget), ::core::mem::transmute_copy(&pvpvpdata)).into()
}
unsafe extern "system" fn EndFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phandlecomplete: *mut super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndFrame(::core::mem::transmute_copy(&phandlecomplete)).into()
}
unsafe extern "system" fn Execute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Execute(::core::mem::transmute_copy(&pexecuteparams)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetVideoDecoderService: GetVideoDecoderService::<Identity, Impl, OFFSET>,
GetCreationParameters: GetCreationParameters::<Identity, Impl, OFFSET>,
GetBuffer: GetBuffer::<Identity, Impl, OFFSET>,
ReleaseBuffer: ReleaseBuffer::<Identity, Impl, OFFSET>,
BeginFrame: BeginFrame::<Identity, Impl, OFFSET>,
EndFrame: EndFrame::<Identity, Impl, OFFSET>,
Execute: Execute::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirectXVideoDecoder as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirectXVideoDecoderService_Impl: Sized + 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 ::core::option::Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, numrendertargets: u32) -> ::windows::core::Result<IDirectXVideoDecoder>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirectXVideoDecoderService {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirectXVideoDecoderService_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoderService_Impl, const OFFSET: isize>() -> IDirectXVideoDecoderService_Vtbl {
unsafe extern "system" fn GetDecoderDeviceGuids<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoDecoderService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcount: *mut u32, pguids: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDecoderDeviceGuids(::core::mem::transmute_copy(&pcount), ::core::mem::transmute_copy(&pguids)).into()
}
unsafe extern "system" fn GetDecoderRenderTargets<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDecoderRenderTargets(::core::mem::transmute_copy(&guid), ::core::mem::transmute_copy(&pcount), ::core::mem::transmute_copy(&pformats)).into()
}
unsafe extern "system" fn GetDecoderConfigurations<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDecoderConfigurations(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateVideoDecoder(::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)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdecode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IDirectXVideoAccelerationService_Vtbl::new::<Identity, Impl, OFFSET>(),
GetDecoderDeviceGuids: GetDecoderDeviceGuids::<Identity, Impl, OFFSET>,
GetDecoderRenderTargets: GetDecoderRenderTargets::<Identity, Impl, OFFSET>,
GetDecoderConfigurations: GetDecoderConfigurations::<Identity, Impl, OFFSET>,
CreateVideoDecoder: CreateVideoDecoder::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirectXVideoDecoderService as ::windows::core::ComInterface>::IID || iid == &<IDirectXVideoAccelerationService as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IDirectXVideoMemoryConfiguration_Impl: Sized {
fn GetAvailableSurfaceTypeByIndex(&self, dwtypeindex: u32) -> ::windows::core::Result<DXVA2_SurfaceType>;
fn SetSurfaceType(&self, dwtype: DXVA2_SurfaceType) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IDirectXVideoMemoryConfiguration {}
impl IDirectXVideoMemoryConfiguration_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoMemoryConfiguration_Impl, const OFFSET: isize>() -> IDirectXVideoMemoryConfiguration_Vtbl {
unsafe extern "system" fn GetAvailableSurfaceTypeByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoMemoryConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwtypeindex: u32, pdwtype: *mut DXVA2_SurfaceType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAvailableSurfaceTypeByIndex(::core::mem::transmute_copy(&dwtypeindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSurfaceType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoMemoryConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwtype: DXVA2_SurfaceType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSurfaceType(::core::mem::transmute_copy(&dwtype)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAvailableSurfaceTypeByIndex: GetAvailableSurfaceTypeByIndex::<Identity, Impl, OFFSET>,
SetSurfaceType: SetSurfaceType::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirectXVideoMemoryConfiguration as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirectXVideoProcessor_Impl: Sized {
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: ::core::option::Option<&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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirectXVideoProcessor {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirectXVideoProcessor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessor_Impl, const OFFSET: isize>() -> IDirectXVideoProcessor_Vtbl {
unsafe extern "system" fn GetVideoProcessorService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppservice: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoProcessorService() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppservice, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCreationParameters<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCreationParameters(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcaps: *mut DXVA2_VideoProcessorCaps) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorCaps(::core::mem::transmute_copy(&pcaps)).into()
}
unsafe extern "system" fn GetProcAmpRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, procampcap: u32, prange: *mut DXVA2_ValueRange) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcAmpRange(::core::mem::transmute_copy(&procampcap)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(prange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFilterPropertyRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, filtersetting: u32, prange: *mut DXVA2_ValueRange) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFilterPropertyRange(::core::mem::transmute_copy(&filtersetting)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(prange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn VideoProcessBlt<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.VideoProcessBlt(::windows::core::from_raw_borrowed(&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, Impl, OFFSET>,
GetCreationParameters: GetCreationParameters::<Identity, Impl, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, Impl, OFFSET>,
GetProcAmpRange: GetProcAmpRange::<Identity, Impl, OFFSET>,
GetFilterPropertyRange: GetFilterPropertyRange::<Identity, Impl, OFFSET>,
VideoProcessBlt: VideoProcessBlt::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirectXVideoProcessor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IDirectXVideoProcessorService_Impl: Sized + 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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IDirectXVideoProcessorService {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IDirectXVideoProcessorService_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessorService_Impl, const OFFSET: isize>() -> IDirectXVideoProcessorService_Vtbl {
unsafe extern "system" fn RegisterVideoProcessorSoftwareDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcallbacks: *const ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterVideoProcessorSoftwareDevice(::core::mem::transmute_copy(&pcallbacks)).into()
}
unsafe extern "system" fn GetVideoProcessorDeviceGuids<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorDeviceGuids(::core::mem::transmute_copy(&pvideodesc), ::core::mem::transmute_copy(&pcount), ::core::mem::transmute_copy(&pguids)).into()
}
unsafe extern "system" fn GetVideoProcessorRenderTargets<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorRenderTargets(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorSubStreamFormats(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorCaps(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcAmpRange(::core::mem::transmute_copy(&videoprocdeviceguid), ::core::mem::transmute_copy(&pvideodesc), ::core::mem::transmute_copy(&rendertargetformat), ::core::mem::transmute_copy(&procampcap)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(prange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFilterPropertyRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFilterPropertyRange(::core::mem::transmute_copy(&videoprocdeviceguid), ::core::mem::transmute_copy(&pvideodesc), ::core::mem::transmute_copy(&rendertargetformat), ::core::mem::transmute_copy(&filtersetting)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(prange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateVideoProcessor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateVideoProcessor(::core::mem::transmute_copy(&videoprocdeviceguid), ::core::mem::transmute_copy(&pvideodesc), ::core::mem::transmute_copy(&rendertargetformat), ::core::mem::transmute_copy(&maxnumsubstreams)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppvidprocess, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IDirectXVideoAccelerationService_Vtbl::new::<Identity, Impl, OFFSET>(),
RegisterVideoProcessorSoftwareDevice: RegisterVideoProcessorSoftwareDevice::<Identity, Impl, OFFSET>,
GetVideoProcessorDeviceGuids: GetVideoProcessorDeviceGuids::<Identity, Impl, OFFSET>,
GetVideoProcessorRenderTargets: GetVideoProcessorRenderTargets::<Identity, Impl, OFFSET>,
GetVideoProcessorSubStreamFormats: GetVideoProcessorSubStreamFormats::<Identity, Impl, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, Impl, OFFSET>,
GetProcAmpRange: GetProcAmpRange::<Identity, Impl, OFFSET>,
GetFilterPropertyRange: GetFilterPropertyRange::<Identity, Impl, OFFSET>,
CreateVideoProcessor: CreateVideoProcessor::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDirectXVideoProcessorService as ::windows::core::ComInterface>::IID || iid == &<IDirectXVideoAccelerationService as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IEVRFilterConfig_Impl: Sized {
fn SetNumberOfStreams(&self, dwmaxstreams: u32) -> ::windows::core::Result<()>;
fn GetNumberOfStreams(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IEVRFilterConfig {}
impl IEVRFilterConfig_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRFilterConfig_Impl, const OFFSET: isize>() -> IEVRFilterConfig_Vtbl {
unsafe extern "system" fn SetNumberOfStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRFilterConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmaxstreams: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetNumberOfStreams(::core::mem::transmute_copy(&dwmaxstreams)).into()
}
unsafe extern "system" fn GetNumberOfStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRFilterConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwmaxstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNumberOfStreams() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwmaxstreams, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetNumberOfStreams: SetNumberOfStreams::<Identity, Impl, OFFSET>,
GetNumberOfStreams: GetNumberOfStreams::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEVRFilterConfig as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IEVRFilterConfigEx_Impl: Sized + IEVRFilterConfig_Impl {
fn SetConfigPrefs(&self, dwconfigflags: u32) -> ::windows::core::Result<()>;
fn GetConfigPrefs(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IEVRFilterConfigEx {}
impl IEVRFilterConfigEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRFilterConfigEx_Impl, const OFFSET: isize>() -> IEVRFilterConfigEx_Vtbl {
unsafe extern "system" fn SetConfigPrefs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRFilterConfigEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwconfigflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetConfigPrefs(::core::mem::transmute_copy(&dwconfigflags)).into()
}
unsafe extern "system" fn GetConfigPrefs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRFilterConfigEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwconfigflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetConfigPrefs() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwconfigflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IEVRFilterConfig_Vtbl::new::<Identity, Impl, OFFSET>(),
SetConfigPrefs: SetConfigPrefs::<Identity, Impl, OFFSET>,
GetConfigPrefs: GetConfigPrefs::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEVRFilterConfigEx as ::windows::core::ComInterface>::IID || iid == &<IEVRFilterConfig as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IEVRTrustedVideoPlugin_Impl: Sized {
fn IsInTrustedVideoMode(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn CanConstrict(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn SetConstriction(&self, dwkpix: u32) -> ::windows::core::Result<()>;
fn DisableImageExport(&self, bdisable: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IEVRTrustedVideoPlugin {}
#[cfg(feature = "Win32_Foundation")]
impl IEVRTrustedVideoPlugin_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>() -> IEVRTrustedVideoPlugin_Vtbl {
unsafe extern "system" fn IsInTrustedVideoMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pyes: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsInTrustedVideoMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pyes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CanConstrict<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pyes: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CanConstrict() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pyes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetConstriction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwkpix: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetConstriction(::core::mem::transmute_copy(&dwkpix)).into()
}
unsafe extern "system" fn DisableImageExport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bdisable: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisableImageExport(::core::mem::transmute_copy(&bdisable)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsInTrustedVideoMode: IsInTrustedVideoMode::<Identity, Impl, OFFSET>,
CanConstrict: CanConstrict::<Identity, Impl, OFFSET>,
SetConstriction: SetConstriction::<Identity, Impl, OFFSET>,
DisableImageExport: DisableImageExport::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEVRTrustedVideoPlugin as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IEVRVideoStreamControl_Impl: Sized {
fn SetStreamActiveState(&self, factive: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetStreamActiveState(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IEVRVideoStreamControl {}
#[cfg(feature = "Win32_Foundation")]
impl IEVRVideoStreamControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRVideoStreamControl_Impl, const OFFSET: isize>() -> IEVRVideoStreamControl_Vtbl {
unsafe extern "system" fn SetStreamActiveState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRVideoStreamControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, factive: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamActiveState(::core::mem::transmute_copy(&factive)).into()
}
unsafe extern "system" fn GetStreamActiveState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEVRVideoStreamControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lpfactive: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamActiveState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(lpfactive, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetStreamActiveState: SetStreamActiveState::<Identity, Impl, OFFSET>,
GetStreamActiveState: GetStreamActiveState::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEVRVideoStreamControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IFileClient_Impl: Sized {
fn GetObjectDiskSize(&self, pqwsize: *mut u64) -> ::windows::core::Result<()>;
fn Write(&self, pfio: ::core::option::Option<&IFileIo>) -> ::windows::core::Result<()>;
fn Read(&self, pfio: ::core::option::Option<&IFileIo>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IFileClient {}
impl IFileClient_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileClient_Impl, const OFFSET: isize>() -> IFileClient_Vtbl {
unsafe extern "system" fn GetObjectDiskSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwsize: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetObjectDiskSize(::core::mem::transmute_copy(&pqwsize)).into()
}
unsafe extern "system" fn Write<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfio: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Write(::windows::core::from_raw_borrowed(&pfio)).into()
}
unsafe extern "system" fn Read<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfio: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Read(::windows::core::from_raw_borrowed(&pfio)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetObjectDiskSize: GetObjectDiskSize::<Identity, Impl, OFFSET>,
Write: Write::<Identity, Impl, OFFSET>,
Read: Read::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IFileClient as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IFileIo_Impl: Sized {
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 super::super::Foundation::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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IFileIo {}
#[cfg(feature = "Win32_Foundation")]
impl IFileIo_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>() -> IFileIo_Vtbl {
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, eaccessmode: FILE_ACCESSMODE, eopenmode: FILE_OPENMODE, pwszfilename: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::core::mem::transmute_copy(&eaccessmode), ::core::mem::transmute_copy(&eopenmode), ::core::mem::transmute(&pwszfilename)).into()
}
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwlength: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLength(::core::mem::transmute_copy(&pqwlength)).into()
}
unsafe extern "system" fn SetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwlength: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLength(::core::mem::transmute_copy(&qwlength)).into()
}
unsafe extern "system" fn GetCurrentPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwposition: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCurrentPosition(::core::mem::transmute_copy(&pqwposition)).into()
}
unsafe extern "system" fn SetCurrentPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwposition: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentPosition(::core::mem::transmute_copy(&qwposition)).into()
}
unsafe extern "system" fn IsEndOfStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbendofstream: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsEndOfStream(::core::mem::transmute_copy(&pbendofstream)).into()
}
unsafe extern "system" fn Read<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbt: *mut u8, ul: u32, pulread: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Read(::core::mem::transmute_copy(&pbt), ::core::mem::transmute_copy(&ul), ::core::mem::transmute_copy(&pulread)).into()
}
unsafe extern "system" fn Write<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbt: *mut u8, ul: u32, pulwritten: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Write(::core::mem::transmute_copy(&pbt), ::core::mem::transmute_copy(&ul), ::core::mem::transmute_copy(&pulwritten)).into()
}
unsafe extern "system" fn Seek<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, eseekorigin: SEEK_ORIGIN, qwseekoffset: u64, dwseekflags: u32, pqwcurrentposition: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Seek(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFileIo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, Impl, OFFSET>,
GetLength: GetLength::<Identity, Impl, OFFSET>,
SetLength: SetLength::<Identity, Impl, OFFSET>,
GetCurrentPosition: GetCurrentPosition::<Identity, Impl, OFFSET>,
SetCurrentPosition: SetCurrentPosition::<Identity, Impl, OFFSET>,
IsEndOfStream: IsEndOfStream::<Identity, Impl, OFFSET>,
Read: Read::<Identity, Impl, OFFSET>,
Write: Write::<Identity, Impl, OFFSET>,
Seek: Seek::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IFileIo as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMF2DBuffer_Impl: Sized {
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<super::super::Foundation::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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMF2DBuffer {}
#[cfg(feature = "Win32_Foundation")]
impl IMF2DBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>() -> IMF2DBuffer_Vtbl {
unsafe extern "system" fn Lock2D<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppbscanline0: *mut *mut u8, plpitch: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Lock2D(::core::mem::transmute_copy(&ppbscanline0), ::core::mem::transmute_copy(&plpitch)).into()
}
unsafe extern "system" fn Unlock2D<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Unlock2D().into()
}
unsafe extern "system" fn GetScanline0AndPitch<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbscanline0: *mut *mut u8, plpitch: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetScanline0AndPitch(::core::mem::transmute_copy(&pbscanline0), ::core::mem::transmute_copy(&plpitch)).into()
}
unsafe extern "system" fn IsContiguousFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfiscontiguous: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsContiguousFormat() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfiscontiguous, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetContiguousLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcblength: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetContiguousLength() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcblength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ContiguousCopyTo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbdestbuffer: *mut u8, cbdestbuffer: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ContiguousCopyTo(::core::mem::transmute_copy(&pbdestbuffer), ::core::mem::transmute_copy(&cbdestbuffer)).into()
}
unsafe extern "system" fn ContiguousCopyFrom<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbsrcbuffer: *const u8, cbsrcbuffer: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ContiguousCopyFrom(::core::mem::transmute_copy(&pbsrcbuffer), ::core::mem::transmute_copy(&cbsrcbuffer)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Lock2D: Lock2D::<Identity, Impl, OFFSET>,
Unlock2D: Unlock2D::<Identity, Impl, OFFSET>,
GetScanline0AndPitch: GetScanline0AndPitch::<Identity, Impl, OFFSET>,
IsContiguousFormat: IsContiguousFormat::<Identity, Impl, OFFSET>,
GetContiguousLength: GetContiguousLength::<Identity, Impl, OFFSET>,
ContiguousCopyTo: ContiguousCopyTo::<Identity, Impl, OFFSET>,
ContiguousCopyFrom: ContiguousCopyFrom::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMF2DBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMF2DBuffer2_Impl: Sized + 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: ::core::option::Option<&IMF2DBuffer2>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMF2DBuffer2 {}
#[cfg(feature = "Win32_Foundation")]
impl IMF2DBuffer2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer2_Impl, const OFFSET: isize>() -> IMF2DBuffer2_Vtbl {
unsafe extern "system" fn Lock2DSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Lock2DSize(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMF2DBuffer2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdestbuffer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Copy2DTo(::windows::core::from_raw_borrowed(&pdestbuffer)).into()
}
Self {
base__: IMF2DBuffer_Vtbl::new::<Identity, Impl, OFFSET>(),
Lock2DSize: Lock2DSize::<Identity, Impl, OFFSET>,
Copy2DTo: Copy2DTo::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMF2DBuffer2 as ::windows::core::ComInterface>::IID || iid == &<IMF2DBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFASFContentInfo_Impl: Sized {
fn GetHeaderSize(&self, pistartofcontent: ::core::option::Option<&IMFMediaBuffer>) -> ::windows::core::Result<u64>;
fn ParseHeader(&self, piheaderbuffer: ::core::option::Option<&IMFMediaBuffer>, cboffsetwithinheader: u64) -> ::windows::core::Result<()>;
fn GenerateHeader(&self, piheader: ::core::option::Option<&IMFMediaBuffer>) -> ::windows::core::Result<u32>;
fn GetProfile(&self) -> ::windows::core::Result<IMFASFProfile>;
fn SetProfile(&self, piprofile: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFASFContentInfo {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFASFContentInfo_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>() -> IMFASFContentInfo_Vtbl {
unsafe extern "system" fn GetHeaderSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pistartofcontent: *mut ::core::ffi::c_void, cbheadersize: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetHeaderSize(::windows::core::from_raw_borrowed(&pistartofcontent)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cbheadersize, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ParseHeader<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piheaderbuffer: *mut ::core::ffi::c_void, cboffsetwithinheader: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ParseHeader(::windows::core::from_raw_borrowed(&piheaderbuffer), ::core::mem::transmute_copy(&cboffsetwithinheader)).into()
}
unsafe extern "system" fn GenerateHeader<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piheader: *mut ::core::ffi::c_void, pcbheader: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GenerateHeader(::windows::core::from_raw_borrowed(&piheader)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbheader, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppiprofile: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProfile() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppiprofile, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piprofile: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProfile(::windows::core::from_raw_borrowed(&piprofile)).into()
}
unsafe extern "system" fn GeneratePresentationDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppipresentationdescriptor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GeneratePresentationDescriptor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppipresentationdescriptor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetEncodingConfigurationPropertyStore<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnumber: u16, ppistore: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEncodingConfigurationPropertyStore(::core::mem::transmute_copy(&wstreamnumber)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistore, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetHeaderSize: GetHeaderSize::<Identity, Impl, OFFSET>,
ParseHeader: ParseHeader::<Identity, Impl, OFFSET>,
GenerateHeader: GenerateHeader::<Identity, Impl, OFFSET>,
GetProfile: GetProfile::<Identity, Impl, OFFSET>,
SetProfile: SetProfile::<Identity, Impl, OFFSET>,
GeneratePresentationDescriptor: GeneratePresentationDescriptor::<Identity, Impl, OFFSET>,
GetEncodingConfigurationPropertyStore: GetEncodingConfigurationPropertyStore::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFContentInfo as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFASFIndexer_Impl: Sized {
fn SetFlags(&self, dwflags: u32) -> ::windows::core::Result<()>;
fn GetFlags(&self) -> ::windows::core::Result<u32>;
fn Initialize(&self, picontentinfo: ::core::option::Option<&IMFASFContentInfo>) -> ::windows::core::Result<()>;
fn GetIndexPosition(&self, picontentinfo: ::core::option::Option<&IMFASFContentInfo>) -> ::windows::core::Result<u64>;
fn SetIndexByteStreams(&self, ppibytestreams: *const ::core::option::Option<IMFByteStream>, cbytestreams: u32) -> ::windows::core::Result<()>;
fn GetIndexByteStreamCount(&self) -> ::windows::core::Result<u32>;
fn GetIndexStatus(&self, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut super::super::Foundation::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> ::windows::core::Result<()>;
fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: super::super::Foundation::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: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
fn CommitIndex(&self, picontentinfo: ::core::option::Option<&IMFASFContentInfo>) -> ::windows::core::Result<()>;
fn GetIndexWriteSpace(&self) -> ::windows::core::Result<u64>;
fn GetCompletedIndex(&self, piindexbuffer: ::core::option::Option<&IMFMediaBuffer>, cboffsetwithinindex: u64) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFASFIndexer {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFASFIndexer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>() -> IMFASFIndexer_Vtbl {
unsafe extern "system" fn SetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFlags(::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn GetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, picontentinfo: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::windows::core::from_raw_borrowed(&picontentinfo)).into()
}
unsafe extern "system" fn GetIndexPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, picontentinfo: *mut ::core::ffi::c_void, pcbindexoffset: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIndexPosition(::windows::core::from_raw_borrowed(&picontentinfo)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbindexoffset, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIndexByteStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppibytestreams: *const *mut ::core::ffi::c_void, cbytestreams: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIndexByteStreams(::core::mem::transmute_copy(&ppibytestreams), ::core::mem::transmute_copy(&cbytestreams)).into()
}
unsafe extern "system" fn GetIndexByteStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcbytestreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIndexByteStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbytestreams, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetIndexStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut super::super::Foundation::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetIndexStatus(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIndexStatus(::core::mem::transmute_copy(&pbindexdescriptor), ::core::mem::transmute_copy(&cbindexdescriptor), ::core::mem::transmute_copy(&fgenerateindex)).into()
}
unsafe extern "system" fn GetSeekPositionForValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSeekPositionForValue(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piasfpacketsample: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GenerateIndexEntries(::windows::core::from_raw_borrowed(&piasfpacketsample)).into()
}
unsafe extern "system" fn CommitIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, picontentinfo: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CommitIndex(::windows::core::from_raw_borrowed(&picontentinfo)).into()
}
unsafe extern "system" fn GetIndexWriteSpace<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcbindexwritespace: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIndexWriteSpace() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbindexwritespace, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCompletedIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piindexbuffer: *mut ::core::ffi::c_void, cboffsetwithinindex: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCompletedIndex(::windows::core::from_raw_borrowed(&piindexbuffer), ::core::mem::transmute_copy(&cboffsetwithinindex)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetFlags: SetFlags::<Identity, Impl, OFFSET>,
GetFlags: GetFlags::<Identity, Impl, OFFSET>,
Initialize: Initialize::<Identity, Impl, OFFSET>,
GetIndexPosition: GetIndexPosition::<Identity, Impl, OFFSET>,
SetIndexByteStreams: SetIndexByteStreams::<Identity, Impl, OFFSET>,
GetIndexByteStreamCount: GetIndexByteStreamCount::<Identity, Impl, OFFSET>,
GetIndexStatus: GetIndexStatus::<Identity, Impl, OFFSET>,
SetIndexStatus: SetIndexStatus::<Identity, Impl, OFFSET>,
GetSeekPositionForValue: GetSeekPositionForValue::<Identity, Impl, OFFSET>,
GenerateIndexEntries: GenerateIndexEntries::<Identity, Impl, OFFSET>,
CommitIndex: CommitIndex::<Identity, Impl, OFFSET>,
GetIndexWriteSpace: GetIndexWriteSpace::<Identity, Impl, OFFSET>,
GetCompletedIndex: GetCompletedIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFIndexer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFASFMultiplexer_Impl: Sized {
fn Initialize(&self, picontentinfo: ::core::option::Option<&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: ::core::option::Option<&IMFSample>, hnstimestampadjust: i64) -> ::windows::core::Result<()>;
fn GetNextPacket(&self, pdwstatusflags: *mut u32, ppipacket: *mut ::core::option::Option<IMFSample>) -> ::windows::core::Result<()>;
fn Flush(&self) -> ::windows::core::Result<()>;
fn End(&self, picontentinfo: ::core::option::Option<&IMFASFContentInfo>) -> ::windows::core::Result<()>;
fn GetStatistics(&self, wstreamnumber: u16) -> ::windows::core::Result<ASF_MUX_STATISTICS>;
fn SetSyncTolerance(&self, mssynctolerance: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFASFMultiplexer {}
impl IMFASFMultiplexer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>() -> IMFASFMultiplexer_Vtbl {
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, picontentinfo: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::windows::core::from_raw_borrowed(&picontentinfo)).into()
}
unsafe extern "system" fn SetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFlags(::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn GetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ProcessSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnumber: u16, pisample: *mut ::core::ffi::c_void, hnstimestampadjust: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessSample(::core::mem::transmute_copy(&wstreamnumber), ::windows::core::from_raw_borrowed(&pisample), ::core::mem::transmute_copy(&hnstimestampadjust)).into()
}
unsafe extern "system" fn GetNextPacket<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwstatusflags: *mut u32, ppipacket: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNextPacket(::core::mem::transmute_copy(&pdwstatusflags), ::core::mem::transmute_copy(&ppipacket)).into()
}
unsafe extern "system" fn Flush<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Flush().into()
}
unsafe extern "system" fn End<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, picontentinfo: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.End(::windows::core::from_raw_borrowed(&picontentinfo)).into()
}
unsafe extern "system" fn GetStatistics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnumber: u16, pmuxstats: *mut ASF_MUX_STATISTICS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStatistics(::core::mem::transmute_copy(&wstreamnumber)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmuxstats, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSyncTolerance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, mssynctolerance: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSyncTolerance(::core::mem::transmute_copy(&mssynctolerance)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, Impl, OFFSET>,
SetFlags: SetFlags::<Identity, Impl, OFFSET>,
GetFlags: GetFlags::<Identity, Impl, OFFSET>,
ProcessSample: ProcessSample::<Identity, Impl, OFFSET>,
GetNextPacket: GetNextPacket::<Identity, Impl, OFFSET>,
Flush: Flush::<Identity, Impl, OFFSET>,
End: End::<Identity, Impl, OFFSET>,
GetStatistics: GetStatistics::<Identity, Impl, OFFSET>,
SetSyncTolerance: SetSyncTolerance::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFMultiplexer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFASFMutualExclusion_Impl: Sized {
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 ::windows::core::RuntimeName for IMFASFMutualExclusion {}
impl IMFASFMutualExclusion_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>() -> IMFASFMutualExclusion_Vtbl {
unsafe extern "system" fn GetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidtype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidtype: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetType(::core::mem::transmute_copy(&guidtype)).into()
}
unsafe extern "system" fn GetRecordCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwrecordcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRecordCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwrecordcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamsForRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwrecordnumber: u32, pwstreamnumarray: *mut u16, pcstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamsForRecord(::core::mem::transmute_copy(&dwrecordnumber), ::core::mem::transmute_copy(&pwstreamnumarray), ::core::mem::transmute_copy(&pcstreams)).into()
}
unsafe extern "system" fn AddStreamForRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwrecordnumber: u32, wstreamnumber: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddStreamForRecord(::core::mem::transmute_copy(&dwrecordnumber), ::core::mem::transmute_copy(&wstreamnumber)).into()
}
unsafe extern "system" fn RemoveStreamFromRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwrecordnumber: u32, wstreamnumber: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveStreamFromRecord(::core::mem::transmute_copy(&dwrecordnumber), ::core::mem::transmute_copy(&wstreamnumber)).into()
}
unsafe extern "system" fn RemoveRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwrecordnumber: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveRecord(::core::mem::transmute_copy(&dwrecordnumber)).into()
}
unsafe extern "system" fn AddRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwrecordnumber: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddRecord() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwrecordnumber, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppimutex: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppimutex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetType: GetType::<Identity, Impl, OFFSET>,
SetType: SetType::<Identity, Impl, OFFSET>,
GetRecordCount: GetRecordCount::<Identity, Impl, OFFSET>,
GetStreamsForRecord: GetStreamsForRecord::<Identity, Impl, OFFSET>,
AddStreamForRecord: AddStreamForRecord::<Identity, Impl, OFFSET>,
RemoveStreamFromRecord: RemoveStreamFromRecord::<Identity, Impl, OFFSET>,
RemoveRecord: RemoveRecord::<Identity, Impl, OFFSET>,
AddRecord: AddRecord::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFMutualExclusion as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFASFProfile_Impl: Sized + IMFAttributes_Impl {
fn GetStreamCount(&self) -> ::windows::core::Result<u32>;
fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: *mut ::core::option::Option<IMFASFStreamConfig>) -> ::windows::core::Result<()>;
fn GetStreamByNumber(&self, wstreamnumber: u16) -> ::windows::core::Result<IMFASFStreamConfig>;
fn SetStream(&self, pistream: ::core::option::Option<&IMFASFStreamConfig>) -> ::windows::core::Result<()>;
fn RemoveStream(&self, wstreamnumber: u16) -> ::windows::core::Result<()>;
fn CreateStream(&self, pimediatype: ::core::option::Option<&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: ::core::option::Option<&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: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFASFProfile {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFASFProfile_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>() -> IMFASFProfile_Vtbl {
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcstreams, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStream(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&pwstreamnumber), ::core::mem::transmute_copy(&ppistream)).into()
}
unsafe extern "system" fn GetStreamByNumber<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnumber: u16, ppistream: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamByNumber(::core::mem::transmute_copy(&wstreamnumber)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistream, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pistream: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStream(::windows::core::from_raw_borrowed(&pistream)).into()
}
unsafe extern "system" fn RemoveStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnumber: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveStream(::core::mem::transmute_copy(&wstreamnumber)).into()
}
unsafe extern "system" fn CreateStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateStream(::windows::core::from_raw_borrowed(&pimediatype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistream, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMutualExclusionCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcmutexs: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMutualExclusionCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcmutexs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMutualExclusion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmutexindex: u32, ppimutex: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMutualExclusion(::core::mem::transmute_copy(&dwmutexindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppimutex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddMutualExclusion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pimutex: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddMutualExclusion(::windows::core::from_raw_borrowed(&pimutex)).into()
}
unsafe extern "system" fn RemoveMutualExclusion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmutexindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveMutualExclusion(::core::mem::transmute_copy(&dwmutexindex)).into()
}
unsafe extern "system" fn CreateMutualExclusion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppimutex: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMutualExclusion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppimutex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamPrioritization<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppistreamprioritization: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamPrioritization() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistreamprioritization, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddStreamPrioritization<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pistreamprioritization: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddStreamPrioritization(::windows::core::from_raw_borrowed(&pistreamprioritization)).into()
}
unsafe extern "system" fn RemoveStreamPrioritization<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveStreamPrioritization().into()
}
unsafe extern "system" fn CreateStreamPrioritization<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppistreamprioritization: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateStreamPrioritization() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistreamprioritization, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppiprofile: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppiprofile, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetStream: GetStream::<Identity, Impl, OFFSET>,
GetStreamByNumber: GetStreamByNumber::<Identity, Impl, OFFSET>,
SetStream: SetStream::<Identity, Impl, OFFSET>,
RemoveStream: RemoveStream::<Identity, Impl, OFFSET>,
CreateStream: CreateStream::<Identity, Impl, OFFSET>,
GetMutualExclusionCount: GetMutualExclusionCount::<Identity, Impl, OFFSET>,
GetMutualExclusion: GetMutualExclusion::<Identity, Impl, OFFSET>,
AddMutualExclusion: AddMutualExclusion::<Identity, Impl, OFFSET>,
RemoveMutualExclusion: RemoveMutualExclusion::<Identity, Impl, OFFSET>,
CreateMutualExclusion: CreateMutualExclusion::<Identity, Impl, OFFSET>,
GetStreamPrioritization: GetStreamPrioritization::<Identity, Impl, OFFSET>,
AddStreamPrioritization: AddStreamPrioritization::<Identity, Impl, OFFSET>,
RemoveStreamPrioritization: RemoveStreamPrioritization::<Identity, Impl, OFFSET>,
CreateStreamPrioritization: CreateStreamPrioritization::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFProfile as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFASFSplitter_Impl: Sized {
fn Initialize(&self, picontentinfo: ::core::option::Option<&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: ::core::option::Option<&IMFMediaBuffer>, cbbufferoffset: u32, cblength: u32) -> ::windows::core::Result<()>;
fn GetNextSample(&self, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: *mut ::core::option::Option<IMFSample>) -> ::windows::core::Result<()>;
fn Flush(&self) -> ::windows::core::Result<()>;
fn GetLastSendTime(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IMFASFSplitter {}
impl IMFASFSplitter_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>() -> IMFASFSplitter_Vtbl {
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, picontentinfo: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::windows::core::from_raw_borrowed(&picontentinfo)).into()
}
unsafe extern "system" fn SetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFlags(::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn GetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SelectStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwstreamnumbers: *const u16, wnumstreams: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SelectStreams(::core::mem::transmute_copy(&pwstreamnumbers), ::core::mem::transmute_copy(&wnumstreams)).into()
}
unsafe extern "system" fn GetSelectedStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwstreamnumbers: *mut u16, pwnumstreams: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSelectedStreams(::core::mem::transmute_copy(&pwstreamnumbers), ::core::mem::transmute_copy(&pwnumstreams)).into()
}
unsafe extern "system" fn ParseData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pibuffer: *mut ::core::ffi::c_void, cbbufferoffset: u32, cblength: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ParseData(::windows::core::from_raw_borrowed(&pibuffer), ::core::mem::transmute_copy(&cbbufferoffset), ::core::mem::transmute_copy(&cblength)).into()
}
unsafe extern "system" fn GetNextSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNextSample(::core::mem::transmute_copy(&pdwstatusflags), ::core::mem::transmute_copy(&pwstreamnumber), ::core::mem::transmute_copy(&ppisample)).into()
}
unsafe extern "system" fn Flush<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Flush().into()
}
unsafe extern "system" fn GetLastSendTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwlastsendtime: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetLastSendTime() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwlastsendtime, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, Impl, OFFSET>,
SetFlags: SetFlags::<Identity, Impl, OFFSET>,
GetFlags: GetFlags::<Identity, Impl, OFFSET>,
SelectStreams: SelectStreams::<Identity, Impl, OFFSET>,
GetSelectedStreams: GetSelectedStreams::<Identity, Impl, OFFSET>,
ParseData: ParseData::<Identity, Impl, OFFSET>,
GetNextSample: GetNextSample::<Identity, Impl, OFFSET>,
Flush: Flush::<Identity, Impl, OFFSET>,
GetLastSendTime: GetLastSendTime::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFSplitter as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFASFStreamConfig_Impl: Sized + 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: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFASFStreamConfig {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFASFStreamConfig_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>() -> IMFASFStreamConfig_Vtbl {
unsafe extern "system" fn GetStreamType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidstreamtype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidstreamtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamNumber<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u16 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamNumber()
}
unsafe extern "system" fn SetStreamNumber<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnum: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamNumber(::core::mem::transmute_copy(&wstreamnum)).into()
}
unsafe extern "system" fn GetMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppimediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppimediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pimediatype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMediaType(::windows::core::from_raw_borrowed(&pimediatype)).into()
}
unsafe extern "system" fn GetPayloadExtensionCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcpayloadextensions: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPayloadExtensionCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcpayloadextensions, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPayloadExtension<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPayloadExtension(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddPayloadExtension(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllPayloadExtensions().into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppistreamconfig: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistreamconfig, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetStreamType: GetStreamType::<Identity, Impl, OFFSET>,
GetStreamNumber: GetStreamNumber::<Identity, Impl, OFFSET>,
SetStreamNumber: SetStreamNumber::<Identity, Impl, OFFSET>,
GetMediaType: GetMediaType::<Identity, Impl, OFFSET>,
SetMediaType: SetMediaType::<Identity, Impl, OFFSET>,
GetPayloadExtensionCount: GetPayloadExtensionCount::<Identity, Impl, OFFSET>,
GetPayloadExtension: GetPayloadExtension::<Identity, Impl, OFFSET>,
AddPayloadExtension: AddPayloadExtension::<Identity, Impl, OFFSET>,
RemoveAllPayloadExtensions: RemoveAllPayloadExtensions::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFStreamConfig as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFASFStreamPrioritization_Impl: Sized {
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 ::windows::core::RuntimeName for IMFASFStreamPrioritization {}
impl IMFASFStreamPrioritization_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamPrioritization_Impl, const OFFSET: isize>() -> IMFASFStreamPrioritization_Vtbl {
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pwstreamnumber: *mut u16, pwstreamflags: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStream(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&pwstreamnumber), ::core::mem::transmute_copy(&pwstreamflags)).into()
}
unsafe extern "system" fn AddStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnumber: u16, wstreamflags: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddStream(::core::mem::transmute_copy(&wstreamnumber), ::core::mem::transmute_copy(&wstreamflags)).into()
}
unsafe extern "system" fn RemoveStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveStream(::core::mem::transmute_copy(&dwstreamindex)).into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppistreamprioritization: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppistreamprioritization, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetStream: GetStream::<Identity, Impl, OFFSET>,
AddStream: AddStream::<Identity, Impl, OFFSET>,
RemoveStream: RemoveStream::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFStreamPrioritization as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFASFStreamSelector_Impl: Sized {
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 ::windows::core::RuntimeName for IMFASFStreamSelector {}
impl IMFASFStreamSelector_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>() -> IMFASFStreamSelector_Vtbl {
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcstreams, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcoutputs: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcoutputs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputnum: u32, pcstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStreamCount(::core::mem::transmute_copy(&dwoutputnum)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcstreams, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputStreamNumbers<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputnum: u32, rgwstreamnumbers: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStreamNumbers(::core::mem::transmute_copy(&dwoutputnum)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rgwstreamnumbers, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputFromStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wstreamnum: u16, pdwoutput: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputFromStream(::core::mem::transmute_copy(&wstreamnum)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwoutput, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputOverride<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputnum: u32, pselection: *mut ASF_SELECTION_STATUS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputOverride(::core::mem::transmute_copy(&dwoutputnum)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pselection, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetOutputOverride<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputnum: u32, selection: ASF_SELECTION_STATUS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputOverride(::core::mem::transmute_copy(&dwoutputnum), ::core::mem::transmute_copy(&selection)).into()
}
unsafe extern "system" fn GetOutputMutexCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputnum: u32, pcmutexes: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputMutexCount(::core::mem::transmute_copy(&dwoutputnum)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcmutexes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputMutex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputMutex(::core::mem::transmute_copy(&dwoutputnum), ::core::mem::transmute_copy(&dwmutexnum)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmutex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetOutputMutexSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputnum: u32, dwmutexnum: u32, wselectedrecord: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputMutexSelection(::core::mem::transmute_copy(&dwoutputnum), ::core::mem::transmute_copy(&dwmutexnum), ::core::mem::transmute_copy(&wselectedrecord)).into()
}
unsafe extern "system" fn GetBandwidthStepCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcstepcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBandwidthStepCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcstepcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBandwidthStep<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetBandwidthStep(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwbitrate: u32, pdwstepnum: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.BitrateToStepNumber(::core::mem::transmute_copy(&dwbitrate)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstepnum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStreamSelectorFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamselectorflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamSelectorFlags(::core::mem::transmute_copy(&dwstreamselectorflags)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetOutputCount: GetOutputCount::<Identity, Impl, OFFSET>,
GetOutputStreamCount: GetOutputStreamCount::<Identity, Impl, OFFSET>,
GetOutputStreamNumbers: GetOutputStreamNumbers::<Identity, Impl, OFFSET>,
GetOutputFromStream: GetOutputFromStream::<Identity, Impl, OFFSET>,
GetOutputOverride: GetOutputOverride::<Identity, Impl, OFFSET>,
SetOutputOverride: SetOutputOverride::<Identity, Impl, OFFSET>,
GetOutputMutexCount: GetOutputMutexCount::<Identity, Impl, OFFSET>,
GetOutputMutex: GetOutputMutex::<Identity, Impl, OFFSET>,
SetOutputMutexSelection: SetOutputMutexSelection::<Identity, Impl, OFFSET>,
GetBandwidthStepCount: GetBandwidthStepCount::<Identity, Impl, OFFSET>,
GetBandwidthStep: GetBandwidthStep::<Identity, Impl, OFFSET>,
BitrateToStepNumber: BitrateToStepNumber::<Identity, Impl, OFFSET>,
SetStreamSelectorFlags: SetStreamSelectorFlags::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFASFStreamSelector as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFActivate_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFActivate {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFActivate_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFActivate_Impl, const OFFSET: isize>() -> IMFActivate_Vtbl {
unsafe extern "system" fn ActivateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ActivateObject(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
unsafe extern "system" fn ShutdownObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFActivate_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShutdownObject().into()
}
unsafe extern "system" fn DetachObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFActivate_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DetachObject().into()
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
ActivateObject: ActivateObject::<Identity, Impl, OFFSET>,
ShutdownObject: ShutdownObject::<Identity, Impl, OFFSET>,
DetachObject: DetachObject::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFActivate as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFAsyncCallback_Impl: Sized {
fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> ::windows::core::Result<()>;
fn Invoke(&self, pasyncresult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFAsyncCallback {}
impl IMFAsyncCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncCallback_Impl, const OFFSET: isize>() -> IMFAsyncCallback_Vtbl {
unsafe extern "system" fn GetParameters<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwflags: *mut u32, pdwqueue: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetParameters(::core::mem::transmute_copy(&pdwflags), ::core::mem::transmute_copy(&pdwqueue)).into()
}
unsafe extern "system" fn Invoke<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pasyncresult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(::windows::core::from_raw_borrowed(&pasyncresult)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetParameters: GetParameters::<Identity, Impl, OFFSET>,
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAsyncCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFAsyncCallbackLogging_Impl: Sized + IMFAsyncCallback_Impl {
fn GetObjectPointer(&self) -> *mut ::core::ffi::c_void;
fn GetObjectTag(&self) -> u32;
}
impl ::windows::core::RuntimeName for IMFAsyncCallbackLogging {}
impl IMFAsyncCallbackLogging_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncCallbackLogging_Impl, const OFFSET: isize>() -> IMFAsyncCallbackLogging_Vtbl {
unsafe extern "system" fn GetObjectPointer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncCallbackLogging_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> *mut ::core::ffi::c_void {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetObjectPointer()
}
unsafe extern "system" fn GetObjectTag<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncCallbackLogging_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetObjectTag()
}
Self {
base__: IMFAsyncCallback_Vtbl::new::<Identity, Impl, OFFSET>(),
GetObjectPointer: GetObjectPointer::<Identity, Impl, OFFSET>,
GetObjectTag: GetObjectTag::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAsyncCallbackLogging as ::windows::core::ComInterface>::IID || iid == &<IMFAsyncCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFAsyncResult_Impl: Sized {
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) -> ::core::option::Option<::windows::core::IUnknown>;
}
impl ::windows::core::RuntimeName for IMFAsyncResult {}
impl IMFAsyncResult_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncResult_Impl, const OFFSET: isize>() -> IMFAsyncResult_Vtbl {
unsafe extern "system" fn GetState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppunkstate: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppunkstate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStatus().into()
}
unsafe extern "system" fn SetStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStatus(::core::mem::transmute_copy(&hrstatus)).into()
}
unsafe extern "system" fn GetObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetObject() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppobject, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStateNoAddRef<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::core::option::Option<::windows::core::IUnknown> {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStateNoAddRef()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetState: GetState::<Identity, Impl, OFFSET>,
GetStatus: GetStatus::<Identity, Impl, OFFSET>,
SetStatus: SetStatus::<Identity, Impl, OFFSET>,
GetObject: GetObject::<Identity, Impl, OFFSET>,
GetStateNoAddRef: GetStateNoAddRef::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAsyncResult as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFAttributes_Impl: Sized {
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<super::super::Foundation::BOOL>;
fn Compare(&self, ptheirs: ::core::option::Option<&IMFAttributes>, matchtype: MF_ATTRIBUTES_MATCH_TYPE) -> ::windows::core::Result<super::super::Foundation::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: ::core::option::Option<&::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: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFAttributes {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFAttributes_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>() -> IMFAttributes_Vtbl {
unsafe extern "system" fn GetItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetItem(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&pvalue)).into()
}
unsafe extern "system" fn GetItemType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, ptype: *mut MF_ATTRIBUTE_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetItemType(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CompareItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CompareItem(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&value)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbresult, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Compare<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptheirs: *mut ::core::ffi::c_void, matchtype: MF_ATTRIBUTES_MATCH_TYPE, pbresult: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Compare(::windows::core::from_raw_borrowed(&ptheirs), ::core::mem::transmute_copy(&matchtype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbresult, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetUINT32<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, punvalue: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetUINT32(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(punvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetUINT64<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, punvalue: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetUINT64(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(punvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDouble<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, pfvalue: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDouble(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetGUID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, pguidvalue: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetGUID(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStringLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, pcchlength: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStringLength(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcchlength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetString<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetString(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAllocatedString(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&ppwszvalue), ::core::mem::transmute_copy(&pcchlength)).into()
}
unsafe extern "system" fn GetBlobSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, pcbblobsize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBlobSize(::core::mem::transmute_copy(&guidkey)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbblobsize, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBlob<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetBlob(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAllocatedBlob(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&ppbuf), ::core::mem::transmute_copy(&pcbsize)).into()
}
unsafe extern "system" fn GetUnknown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetUnknown(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
unsafe extern "system" fn SetItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetItem(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn DeleteItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteItem(::core::mem::transmute_copy(&guidkey)).into()
}
unsafe extern "system" fn DeleteAllItems<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteAllItems().into()
}
unsafe extern "system" fn SetUINT32<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, unvalue: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUINT32(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&unvalue)).into()
}
unsafe extern "system" fn SetUINT64<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, unvalue: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUINT64(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&unvalue)).into()
}
unsafe extern "system" fn SetDouble<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, fvalue: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDouble(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&fvalue)).into()
}
unsafe extern "system" fn SetGUID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, guidvalue: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetGUID(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&guidvalue)).into()
}
unsafe extern "system" fn SetString<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, wszvalue: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetString(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute(&wszvalue)).into()
}
unsafe extern "system" fn SetBlob<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidkey: *const ::windows::core::GUID, pbuf: *const u8, cbbufsize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBlob(::core::mem::transmute_copy(&guidkey), ::core::mem::transmute_copy(&pbuf), ::core::mem::transmute_copy(&cbbufsize)).into()
}
unsafe extern "system" fn SetUnknown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUnknown(::core::mem::transmute_copy(&guidkey), ::windows::core::from_raw_borrowed(&punknown)).into()
}
unsafe extern "system" fn LockStore<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockStore().into()
}
unsafe extern "system" fn UnlockStore<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockStore().into()
}
unsafe extern "system" fn GetCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcitems: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcitems, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetItemByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetItemByIndex(::core::mem::transmute_copy(&unindex), ::core::mem::transmute_copy(&pguidkey), ::core::mem::transmute_copy(&pvalue)).into()
}
unsafe extern "system" fn CopyAllItems<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAttributes_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdest: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CopyAllItems(::windows::core::from_raw_borrowed(&pdest)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetItem: GetItem::<Identity, Impl, OFFSET>,
GetItemType: GetItemType::<Identity, Impl, OFFSET>,
CompareItem: CompareItem::<Identity, Impl, OFFSET>,
Compare: Compare::<Identity, Impl, OFFSET>,
GetUINT32: GetUINT32::<Identity, Impl, OFFSET>,
GetUINT64: GetUINT64::<Identity, Impl, OFFSET>,
GetDouble: GetDouble::<Identity, Impl, OFFSET>,
GetGUID: GetGUID::<Identity, Impl, OFFSET>,
GetStringLength: GetStringLength::<Identity, Impl, OFFSET>,
GetString: GetString::<Identity, Impl, OFFSET>,
GetAllocatedString: GetAllocatedString::<Identity, Impl, OFFSET>,
GetBlobSize: GetBlobSize::<Identity, Impl, OFFSET>,
GetBlob: GetBlob::<Identity, Impl, OFFSET>,
GetAllocatedBlob: GetAllocatedBlob::<Identity, Impl, OFFSET>,
GetUnknown: GetUnknown::<Identity, Impl, OFFSET>,
SetItem: SetItem::<Identity, Impl, OFFSET>,
DeleteItem: DeleteItem::<Identity, Impl, OFFSET>,
DeleteAllItems: DeleteAllItems::<Identity, Impl, OFFSET>,
SetUINT32: SetUINT32::<Identity, Impl, OFFSET>,
SetUINT64: SetUINT64::<Identity, Impl, OFFSET>,
SetDouble: SetDouble::<Identity, Impl, OFFSET>,
SetGUID: SetGUID::<Identity, Impl, OFFSET>,
SetString: SetString::<Identity, Impl, OFFSET>,
SetBlob: SetBlob::<Identity, Impl, OFFSET>,
SetUnknown: SetUnknown::<Identity, Impl, OFFSET>,
LockStore: LockStore::<Identity, Impl, OFFSET>,
UnlockStore: UnlockStore::<Identity, Impl, OFFSET>,
GetCount: GetCount::<Identity, Impl, OFFSET>,
GetItemByIndex: GetItemByIndex::<Identity, Impl, OFFSET>,
CopyAllItems: CopyAllItems::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Media_Audio\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_Audio", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFAudioMediaType_Impl: Sized + IMFMediaType_Impl {
fn GetAudioFormat(&self) -> *mut super::Audio::WAVEFORMATEX;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_Audio", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFAudioMediaType {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_Audio", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFAudioMediaType_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioMediaType_Impl, const OFFSET: isize>() -> IMFAudioMediaType_Vtbl {
unsafe extern "system" fn GetAudioFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioMediaType_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> *mut super::Audio::WAVEFORMATEX {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAudioFormat()
}
Self { base__: IMFMediaType_Vtbl::new::<Identity, Impl, OFFSET>(), GetAudioFormat: GetAudioFormat::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAudioMediaType as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID || iid == &<IMFMediaType as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFAudioPolicy_Impl: Sized {
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 ::windows::core::RuntimeName for IMFAudioPolicy {}
impl IMFAudioPolicy_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>() -> IMFAudioPolicy_Vtbl {
unsafe extern "system" fn SetGroupingParam<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rguidclass: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetGroupingParam(::core::mem::transmute_copy(&rguidclass)).into()
}
unsafe extern "system" fn GetGroupingParam<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidclass: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetGroupingParam() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidclass, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDisplayName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszname: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDisplayName(::core::mem::transmute(&pszname)).into()
}
unsafe extern "system" fn GetDisplayName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszname: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDisplayName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pszname, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIconPath<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszpath: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIconPath(::core::mem::transmute(&pszpath)).into()
}
unsafe extern "system" fn GetIconPath<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszpath: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIconPath() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pszpath, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetGroupingParam: SetGroupingParam::<Identity, Impl, OFFSET>,
GetGroupingParam: GetGroupingParam::<Identity, Impl, OFFSET>,
SetDisplayName: SetDisplayName::<Identity, Impl, OFFSET>,
GetDisplayName: GetDisplayName::<Identity, Impl, OFFSET>,
SetIconPath: SetIconPath::<Identity, Impl, OFFSET>,
GetIconPath: GetIconPath::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAudioPolicy as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFAudioStreamVolume_Impl: Sized {
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 ::windows::core::RuntimeName for IMFAudioStreamVolume {}
impl IMFAudioStreamVolume_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioStreamVolume_Impl, const OFFSET: isize>() -> IMFAudioStreamVolume_Vtbl {
unsafe extern "system" fn GetChannelCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetChannelCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetChannelVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, flevel: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetChannelVolume(::core::mem::transmute_copy(&dwindex), ::core::mem::transmute_copy(&flevel)).into()
}
unsafe extern "system" fn GetChannelVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, pflevel: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetChannelVolume(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflevel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllVolumes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwcount: u32, pfvolumes: *const f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllVolumes(::core::mem::transmute_copy(&dwcount), ::core::mem::transmute_copy(&pfvolumes)).into()
}
unsafe extern "system" fn GetAllVolumes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwcount: u32, pfvolumes: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAllVolumes(::core::mem::transmute_copy(&dwcount), ::core::mem::transmute_copy(&pfvolumes)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetChannelCount: GetChannelCount::<Identity, Impl, OFFSET>,
SetChannelVolume: SetChannelVolume::<Identity, Impl, OFFSET>,
GetChannelVolume: GetChannelVolume::<Identity, Impl, OFFSET>,
SetAllVolumes: SetAllVolumes::<Identity, Impl, OFFSET>,
GetAllVolumes: GetAllVolumes::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFAudioStreamVolume as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFBufferListNotify_Impl: Sized {
fn OnAddSourceBuffer(&self);
fn OnRemoveSourceBuffer(&self);
}
impl ::windows::core::RuntimeName for IMFBufferListNotify {}
impl IMFBufferListNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFBufferListNotify_Impl, const OFFSET: isize>() -> IMFBufferListNotify_Vtbl {
unsafe extern "system" fn OnAddSourceBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFBufferListNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnAddSourceBuffer()
}
unsafe extern "system" fn OnRemoveSourceBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFBufferListNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnRemoveSourceBuffer()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnAddSourceBuffer: OnAddSourceBuffer::<Identity, Impl, OFFSET>,
OnRemoveSourceBuffer: OnRemoveSourceBuffer::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFBufferListNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFByteStream_Impl: Sized {
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<super::super::Foundation::BOOL>;
fn Read(&self, pb: *mut u8, cb: u32, pcbread: *mut u32) -> ::windows::core::Result<()>;
fn BeginRead(&self, pb: *mut u8, cb: u32, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndRead(&self, presult: ::core::option::Option<&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: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndWrite(&self, presult: ::core::option::Option<&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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFByteStream {}
#[cfg(feature = "Win32_Foundation")]
impl IMFByteStream_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>() -> IMFByteStream_Vtbl {
unsafe extern "system" fn GetCapabilities<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcapabilities: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCapabilities() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcapabilities, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwlength: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetLength() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pqwlength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwlength: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLength(::core::mem::transmute_copy(&qwlength)).into()
}
unsafe extern "system" fn GetCurrentPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwposition: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentPosition() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pqwposition, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetCurrentPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwposition: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentPosition(::core::mem::transmute_copy(&qwposition)).into()
}
unsafe extern "system" fn IsEndOfStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfendofstream: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsEndOfStream() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfendofstream, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Read<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pb: *mut u8, cb: u32, pcbread: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Read(::core::mem::transmute_copy(&pb), ::core::mem::transmute_copy(&cb), ::core::mem::transmute_copy(&pcbread)).into()
}
unsafe extern "system" fn BeginRead<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginRead(::core::mem::transmute_copy(&pb), ::core::mem::transmute_copy(&cb), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndRead<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void, pcbread: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndRead(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbread, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Write<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pb: *const u8, cb: u32, pcbwritten: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Write(::core::mem::transmute_copy(&pb), ::core::mem::transmute_copy(&cb)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbwritten, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginWrite<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginWrite(::core::mem::transmute_copy(&pb), ::core::mem::transmute_copy(&cb), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndWrite<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void, pcbwritten: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndWrite(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbwritten, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Seek<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Seek(::core::mem::transmute_copy(&seekorigin), ::core::mem::transmute_copy(&llseekoffset), ::core::mem::transmute_copy(&dwseekflags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pqwcurrentposition, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Flush<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Flush().into()
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCapabilities: GetCapabilities::<Identity, Impl, OFFSET>,
GetLength: GetLength::<Identity, Impl, OFFSET>,
SetLength: SetLength::<Identity, Impl, OFFSET>,
GetCurrentPosition: GetCurrentPosition::<Identity, Impl, OFFSET>,
SetCurrentPosition: SetCurrentPosition::<Identity, Impl, OFFSET>,
IsEndOfStream: IsEndOfStream::<Identity, Impl, OFFSET>,
Read: Read::<Identity, Impl, OFFSET>,
BeginRead: BeginRead::<Identity, Impl, OFFSET>,
EndRead: EndRead::<Identity, Impl, OFFSET>,
Write: Write::<Identity, Impl, OFFSET>,
BeginWrite: BeginWrite::<Identity, Impl, OFFSET>,
EndWrite: EndWrite::<Identity, Impl, OFFSET>,
Seek: Seek::<Identity, Impl, OFFSET>,
Flush: Flush::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStream as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFByteStreamBuffering_Impl: Sized {
fn SetBufferingParams(&self, pparams: *const MFBYTESTREAM_BUFFERING_PARAMS) -> ::windows::core::Result<()>;
fn EnableBuffering(&self, fenable: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn StopBuffering(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFByteStreamBuffering {}
#[cfg(feature = "Win32_Foundation")]
impl IMFByteStreamBuffering_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamBuffering_Impl, const OFFSET: isize>() -> IMFByteStreamBuffering_Vtbl {
unsafe extern "system" fn SetBufferingParams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamBuffering_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pparams: *const MFBYTESTREAM_BUFFERING_PARAMS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBufferingParams(::core::mem::transmute_copy(&pparams)).into()
}
unsafe extern "system" fn EnableBuffering<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamBuffering_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenable: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableBuffering(::core::mem::transmute_copy(&fenable)).into()
}
unsafe extern "system" fn StopBuffering<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamBuffering_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StopBuffering().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetBufferingParams: SetBufferingParams::<Identity, Impl, OFFSET>,
EnableBuffering: EnableBuffering::<Identity, Impl, OFFSET>,
StopBuffering: StopBuffering::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStreamBuffering as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFByteStreamCacheControl_Impl: Sized {
fn StopBackgroundTransfer(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFByteStreamCacheControl {}
impl IMFByteStreamCacheControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamCacheControl_Impl, const OFFSET: isize>() -> IMFByteStreamCacheControl_Vtbl {
unsafe extern "system" fn StopBackgroundTransfer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamCacheControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StopBackgroundTransfer().into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), StopBackgroundTransfer: StopBackgroundTransfer::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStreamCacheControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFByteStreamCacheControl2_Impl: Sized + 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<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFByteStreamCacheControl2 {}
#[cfg(feature = "Win32_Foundation")]
impl IMFByteStreamCacheControl2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>() -> IMFByteStreamCacheControl2_Vtbl {
unsafe extern "system" fn GetByteRanges<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetByteRanges(::core::mem::transmute_copy(&pcranges), ::core::mem::transmute_copy(&ppranges)).into()
}
unsafe extern "system" fn SetCacheLimit<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwbytes: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCacheLimit(::core::mem::transmute_copy(&qwbytes)).into()
}
unsafe extern "system" fn IsBackgroundTransferActive<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfactive: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsBackgroundTransferActive() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfactive, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFByteStreamCacheControl_Vtbl::new::<Identity, Impl, OFFSET>(),
GetByteRanges: GetByteRanges::<Identity, Impl, OFFSET>,
SetCacheLimit: SetCacheLimit::<Identity, Impl, OFFSET>,
IsBackgroundTransferActive: IsBackgroundTransferActive::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStreamCacheControl2 as ::windows::core::ComInterface>::IID || iid == &<IMFByteStreamCacheControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFByteStreamHandler_Impl: Sized {
fn BeginCreateObject(&self, pbytestream: ::core::option::Option<&IMFByteStream>, pwszurl: &::windows::core::PCWSTR, dwflags: u32, pprops: ::core::option::Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut ::core::option::Option<::windows::core::IUnknown>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndCreateObject(&self, presult: ::core::option::Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn GetMaxNumberOfBytesRequiredForResolution(&self) -> ::windows::core::Result<u64>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::windows::core::RuntimeName for IMFByteStreamHandler {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFByteStreamHandler_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamHandler_Impl, const OFFSET: isize>() -> IMFByteStreamHandler_Vtbl {
unsafe extern "system" fn BeginCreateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginCreateObject(::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute(&pwszurl), ::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pprops), ::core::mem::transmute_copy(&ppiunknowncancelcookie), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndCreateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndCreateObject(::windows::core::from_raw_borrowed(&presult), ::core::mem::transmute_copy(&pobjecttype), ::core::mem::transmute_copy(&ppobject)).into()
}
unsafe extern "system" fn CancelObjectCreation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piunknowncancelcookie: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelObjectCreation(::windows::core::from_raw_borrowed(&piunknowncancelcookie)).into()
}
unsafe extern "system" fn GetMaxNumberOfBytesRequiredForResolution<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwbytes: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMaxNumberOfBytesRequiredForResolution() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pqwbytes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginCreateObject: BeginCreateObject::<Identity, Impl, OFFSET>,
EndCreateObject: EndCreateObject::<Identity, Impl, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, Impl, OFFSET>,
GetMaxNumberOfBytesRequiredForResolution: GetMaxNumberOfBytesRequiredForResolution::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStreamHandler as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFByteStreamProxyClassFactory_Impl: Sized {
fn CreateByteStreamProxy(&self, pbytestream: ::core::option::Option<&IMFByteStream>, pattributes: ::core::option::Option<&IMFAttributes>, riid: *const ::windows::core::GUID, ppvobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFByteStreamProxyClassFactory {}
impl IMFByteStreamProxyClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamProxyClassFactory_Impl, const OFFSET: isize>() -> IMFByteStreamProxyClassFactory_Vtbl {
unsafe extern "system" fn CreateByteStreamProxy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateByteStreamProxy(::windows::core::from_raw_borrowed(&pbytestream), ::windows::core::from_raw_borrowed(&pattributes), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvobject)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateByteStreamProxy: CreateByteStreamProxy::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStreamProxyClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFByteStreamTimeSeek_Impl: Sized {
fn IsTimeSeekSupported(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn TimeSeek(&self, qwtimeposition: u64) -> ::windows::core::Result<()>;
fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFByteStreamTimeSeek {}
#[cfg(feature = "Win32_Foundation")]
impl IMFByteStreamTimeSeek_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>() -> IMFByteStreamTimeSeek_Vtbl {
unsafe extern "system" fn IsTimeSeekSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pftimeseekissupported: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsTimeSeekSupported() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pftimeseekissupported, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn TimeSeek<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwtimeposition: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TimeSeek(::core::mem::transmute_copy(&qwtimeposition)).into()
}
unsafe extern "system" fn GetTimeSeekResult<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTimeSeekResult(::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, Impl, OFFSET>,
TimeSeek: TimeSeek::<Identity, Impl, OFFSET>,
GetTimeSeekResult: GetTimeSeekResult::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFByteStreamTimeSeek as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraConfigurationManager_Impl: Sized {
fn LoadDefaults(&self, cameraattributes: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<IMFCameraControlDefaultsCollection>;
fn SaveDefaults(&self, configurations: ::core::option::Option<&IMFCameraControlDefaultsCollection>) -> ::windows::core::Result<()>;
fn Shutdown(&self);
}
impl ::windows::core::RuntimeName for IMFCameraConfigurationManager {}
impl IMFCameraConfigurationManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraConfigurationManager_Impl, const OFFSET: isize>() -> IMFCameraConfigurationManager_Vtbl {
unsafe extern "system" fn LoadDefaults<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LoadDefaults(::windows::core::from_raw_borrowed(&cameraattributes)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(configurations, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SaveDefaults<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraConfigurationManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, configurations: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SaveDefaults(::windows::core::from_raw_borrowed(&configurations)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraConfigurationManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LoadDefaults: LoadDefaults::<Identity, Impl, OFFSET>,
SaveDefaults: SaveDefaults::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraConfigurationManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraControlDefaults_Impl: Sized {
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 ::windows::core::RuntimeName for IMFCameraControlDefaults {}
impl IMFCameraControlDefaults_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaults_Impl, const OFFSET: isize>() -> IMFCameraControlDefaults_Vtbl {
unsafe extern "system" fn GetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_CAMERA_CONTROL_CONFIGURATION_TYPE {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetType()
}
unsafe extern "system" fn GetRangeInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rangeinfo: *mut MF_CAMERA_CONTROL_RANGE_INFO) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRangeInfo() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rangeinfo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn LockControlData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockControlData(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockControlData().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetType: GetType::<Identity, Impl, OFFSET>,
GetRangeInfo: GetRangeInfo::<Identity, Impl, OFFSET>,
LockControlData: LockControlData::<Identity, Impl, OFFSET>,
UnlockControlData: UnlockControlData::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraControlDefaults as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFCameraControlDefaultsCollection_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFCameraControlDefaultsCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFCameraControlDefaultsCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>() -> IMFCameraControlDefaultsCollection_Vtbl {
unsafe extern "system" fn GetControlCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetControlCount()
}
unsafe extern "system" fn GetControl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, configuration: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetControl(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(configuration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOrAddExtendedControl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOrAddExtendedControl(::core::mem::transmute_copy(&configtype), ::core::mem::transmute_copy(&constrolid), ::core::mem::transmute_copy(&streamid), ::core::mem::transmute_copy(&datasize)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(defaults, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOrAddControl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOrAddControl(::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)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(defaults, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveControl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, controlset: *const ::windows::core::GUID, constrolid: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveControl(::core::mem::transmute_copy(&controlset), ::core::mem::transmute_copy(&constrolid)).into()
}
unsafe extern "system" fn RemoveAllControls<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllControls().into()
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetControlCount: GetControlCount::<Identity, Impl, OFFSET>,
GetControl: GetControl::<Identity, Impl, OFFSET>,
GetOrAddExtendedControl: GetOrAddExtendedControl::<Identity, Impl, OFFSET>,
GetOrAddControl: GetOrAddControl::<Identity, Impl, OFFSET>,
RemoveControl: RemoveControl::<Identity, Impl, OFFSET>,
RemoveAllControls: RemoveAllControls::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraControlDefaultsCollection as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraControlMonitor_Impl: Sized {
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 ::windows::core::RuntimeName for IMFCameraControlMonitor {}
impl IMFCameraControlMonitor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlMonitor_Impl, const OFFSET: isize>() -> IMFCameraControlMonitor_Vtbl {
unsafe extern "system" fn Start<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start().into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn AddControlSubscription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, controlset: ::windows::core::GUID, id: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddControlSubscription(::core::mem::transmute(&controlset), ::core::mem::transmute_copy(&id)).into()
}
unsafe extern "system" fn RemoveControlSubscription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, controlset: ::windows::core::GUID, id: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveControlSubscription(::core::mem::transmute(&controlset), ::core::mem::transmute_copy(&id)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Start: Start::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
AddControlSubscription: AddControlSubscription::<Identity, Impl, OFFSET>,
RemoveControlSubscription: RemoveControlSubscription::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraControlMonitor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraControlNotify_Impl: Sized {
fn OnChange(&self, controlset: *const ::windows::core::GUID, id: u32);
fn OnError(&self, hrstatus: ::windows::core::HRESULT);
}
impl ::windows::core::RuntimeName for IMFCameraControlNotify {}
impl IMFCameraControlNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlNotify_Impl, const OFFSET: isize>() -> IMFCameraControlNotify_Vtbl {
unsafe extern "system" fn OnChange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, controlset: *const ::windows::core::GUID, id: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnChange(::core::mem::transmute_copy(&controlset), ::core::mem::transmute_copy(&id))
}
unsafe extern "system" fn OnError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraControlNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hrstatus: ::windows::core::HRESULT) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnError(::core::mem::transmute_copy(&hrstatus))
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnChange: OnChange::<Identity, Impl, OFFSET>,
OnError: OnError::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraControlNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraOcclusionStateMonitor_Impl: Sized {
fn Start(&self) -> ::windows::core::Result<()>;
fn Stop(&self) -> ::windows::core::Result<()>;
fn GetSupportedStates(&self) -> u32;
}
impl ::windows::core::RuntimeName for IMFCameraOcclusionStateMonitor {}
impl IMFCameraOcclusionStateMonitor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>() -> IMFCameraOcclusionStateMonitor_Vtbl {
unsafe extern "system" fn Start<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start().into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn GetSupportedStates<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSupportedStates()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Start: Start::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
GetSupportedStates: GetSupportedStates::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraOcclusionStateMonitor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraOcclusionStateReport_Impl: Sized {
fn GetOcclusionState(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IMFCameraOcclusionStateReport {}
impl IMFCameraOcclusionStateReport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateReport_Impl, const OFFSET: isize>() -> IMFCameraOcclusionStateReport_Vtbl {
unsafe extern "system" fn GetOcclusionState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, occlusionstate: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOcclusionState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(occlusionstate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetOcclusionState: GetOcclusionState::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraOcclusionStateReport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraOcclusionStateReportCallback_Impl: Sized {
fn OnOcclusionStateReport(&self, occlusionstatereport: ::core::option::Option<&IMFCameraOcclusionStateReport>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCameraOcclusionStateReportCallback {}
impl IMFCameraOcclusionStateReportCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateReportCallback_Impl, const OFFSET: isize>() -> IMFCameraOcclusionStateReportCallback_Vtbl {
unsafe extern "system" fn OnOcclusionStateReport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraOcclusionStateReportCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, occlusionstatereport: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnOcclusionStateReport(::windows::core::from_raw_borrowed(&occlusionstatereport)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnOcclusionStateReport: OnOcclusionStateReport::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraOcclusionStateReportCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCameraSyncObject_Impl: Sized {
fn WaitOnSignal(&self, timeoutinms: u32) -> ::windows::core::Result<()>;
fn Shutdown(&self);
}
impl ::windows::core::RuntimeName for IMFCameraSyncObject {}
impl IMFCameraSyncObject_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraSyncObject_Impl, const OFFSET: isize>() -> IMFCameraSyncObject_Vtbl {
unsafe extern "system" fn WaitOnSignal<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraSyncObject_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, timeoutinms: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WaitOnSignal(::core::mem::transmute_copy(&timeoutinms)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCameraSyncObject_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
WaitOnSignal: WaitOnSignal::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCameraSyncObject as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFCaptureEngine_Impl: Sized {
fn Initialize(&self, peventcallback: ::core::option::Option<&IMFCaptureEngineOnEventCallback>, pattributes: ::core::option::Option<&IMFAttributes>, paudiosource: ::core::option::Option<&::windows::core::IUnknown>, pvideosource: ::core::option::Option<&::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: super::super::Foundation::BOOL, bflushunprocessedsamples: super::super::Foundation::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>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFCaptureEngine {}
#[cfg(feature = "Win32_Foundation")]
impl IMFCaptureEngine_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>() -> IMFCaptureEngine_Vtbl {
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::windows::core::from_raw_borrowed(&peventcallback), ::windows::core::from_raw_borrowed(&pattributes), ::windows::core::from_raw_borrowed(&paudiosource), ::windows::core::from_raw_borrowed(&pvideosource)).into()
}
unsafe extern "system" fn StartPreview<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StartPreview().into()
}
unsafe extern "system" fn StopPreview<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StopPreview().into()
}
unsafe extern "system" fn StartRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StartRecord().into()
}
unsafe extern "system" fn StopRecord<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bfinalize: super::super::Foundation::BOOL, bflushunprocessedsamples: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StopRecord(::core::mem::transmute_copy(&bfinalize), ::core::mem::transmute_copy(&bflushunprocessedsamples)).into()
}
unsafe extern "system" fn TakePhoto<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TakePhoto().into()
}
unsafe extern "system" fn GetSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSink(::core::mem::transmute_copy(&mfcaptureenginesinktype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsink, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppsource: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, Impl, OFFSET>,
StartPreview: StartPreview::<Identity, Impl, OFFSET>,
StopPreview: StopPreview::<Identity, Impl, OFFSET>,
StartRecord: StartRecord::<Identity, Impl, OFFSET>,
StopRecord: StopRecord::<Identity, Impl, OFFSET>,
TakePhoto: TakePhoto::<Identity, Impl, OFFSET>,
GetSink: GetSink::<Identity, Impl, OFFSET>,
GetSource: GetSource::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureEngine as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureEngineClassFactory_Impl: Sized {
fn CreateInstance(&self, clsid: *const ::windows::core::GUID, riid: *const ::windows::core::GUID, ppvobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureEngineClassFactory {}
impl IMFCaptureEngineClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineClassFactory_Impl, const OFFSET: isize>() -> IMFCaptureEngineClassFactory_Vtbl {
unsafe extern "system" fn CreateInstance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateInstance(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureEngineClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureEngineOnEventCallback_Impl: Sized {
fn OnEvent(&self, pevent: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureEngineOnEventCallback {}
impl IMFCaptureEngineOnEventCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineOnEventCallback_Impl, const OFFSET: isize>() -> IMFCaptureEngineOnEventCallback_Vtbl {
unsafe extern "system" fn OnEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineOnEventCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnEvent(::windows::core::from_raw_borrowed(&pevent)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnEvent: OnEvent::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureEngineOnEventCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureEngineOnSampleCallback_Impl: Sized {
fn OnSample(&self, psample: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureEngineOnSampleCallback {}
impl IMFCaptureEngineOnSampleCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineOnSampleCallback_Impl, const OFFSET: isize>() -> IMFCaptureEngineOnSampleCallback_Vtbl {
unsafe extern "system" fn OnSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineOnSampleCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psample: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSample(::windows::core::from_raw_borrowed(&psample)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnSample: OnSample::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureEngineOnSampleCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureEngineOnSampleCallback2_Impl: Sized + IMFCaptureEngineOnSampleCallback_Impl {
fn OnSynchronizedEvent(&self, pevent: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureEngineOnSampleCallback2 {}
impl IMFCaptureEngineOnSampleCallback2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineOnSampleCallback2_Impl, const OFFSET: isize>() -> IMFCaptureEngineOnSampleCallback2_Vtbl {
unsafe extern "system" fn OnSynchronizedEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureEngineOnSampleCallback2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSynchronizedEvent(::windows::core::from_raw_borrowed(&pevent)).into()
}
Self {
base__: IMFCaptureEngineOnSampleCallback_Vtbl::new::<Identity, Impl, OFFSET>(),
OnSynchronizedEvent: OnSynchronizedEvent::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureEngineOnSampleCallback2 as ::windows::core::ComInterface>::IID || iid == &<IMFCaptureEngineOnSampleCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCapturePhotoConfirmation_Impl: Sized {
fn SetPhotoConfirmationCallback(&self, pnotificationcallback: ::core::option::Option<&IMFAsyncCallback>) -> ::windows::core::Result<()>;
fn SetPixelFormat(&self, subtype: &::windows::core::GUID) -> ::windows::core::Result<()>;
fn GetPixelFormat(&self) -> ::windows::core::Result<::windows::core::GUID>;
}
impl ::windows::core::RuntimeName for IMFCapturePhotoConfirmation {}
impl IMFCapturePhotoConfirmation_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>() -> IMFCapturePhotoConfirmation_Vtbl {
unsafe extern "system" fn SetPhotoConfirmationCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnotificationcallback: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPhotoConfirmationCallback(::windows::core::from_raw_borrowed(&pnotificationcallback)).into()
}
unsafe extern "system" fn SetPixelFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, subtype: ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPixelFormat(::core::mem::transmute(&subtype)).into()
}
unsafe extern "system" fn GetPixelFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, subtype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPixelFormat() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(subtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetPhotoConfirmationCallback: SetPhotoConfirmationCallback::<Identity, Impl, OFFSET>,
SetPixelFormat: SetPixelFormat::<Identity, Impl, OFFSET>,
GetPixelFormat: GetPixelFormat::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCapturePhotoConfirmation as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCapturePhotoSink_Impl: Sized + IMFCaptureSink_Impl {
fn SetOutputFileName(&self, filename: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn SetSampleCallback(&self, pcallback: ::core::option::Option<&IMFCaptureEngineOnSampleCallback>) -> ::windows::core::Result<()>;
fn SetOutputByteStream(&self, pbytestream: ::core::option::Option<&IMFByteStream>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCapturePhotoSink {}
impl IMFCapturePhotoSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoSink_Impl, const OFFSET: isize>() -> IMFCapturePhotoSink_Vtbl {
unsafe extern "system" fn SetOutputFileName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, filename: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputFileName(::core::mem::transmute(&filename)).into()
}
unsafe extern "system" fn SetSampleCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcallback: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSampleCallback(::windows::core::from_raw_borrowed(&pcallback)).into()
}
unsafe extern "system" fn SetOutputByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePhotoSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbytestream: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputByteStream(::windows::core::from_raw_borrowed(&pbytestream)).into()
}
Self {
base__: IMFCaptureSink_Vtbl::new::<Identity, Impl, OFFSET>(),
SetOutputFileName: SetOutputFileName::<Identity, Impl, OFFSET>,
SetSampleCallback: SetSampleCallback::<Identity, Impl, OFFSET>,
SetOutputByteStream: SetOutputByteStream::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCapturePhotoSink as ::windows::core::ComInterface>::IID || iid == &<IMFCaptureSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFCapturePreviewSink_Impl: Sized + IMFCaptureSink_Impl {
fn SetRenderHandle(&self, handle: super::super::Foundation::HANDLE) -> ::windows::core::Result<()>;
fn SetRenderSurface(&self, psurface: ::core::option::Option<&::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: ::core::option::Option<&IMFCaptureEngineOnSampleCallback>) -> ::windows::core::Result<()>;
fn GetMirrorState(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn SetMirrorState(&self, fmirrorstate: super::super::Foundation::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: ::core::option::Option<&IMFMediaSink>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFCapturePreviewSink {}
#[cfg(feature = "Win32_Foundation")]
impl IMFCapturePreviewSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>() -> IMFCapturePreviewSink_Vtbl {
unsafe extern "system" fn SetRenderHandle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handle: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRenderHandle(::core::mem::transmute_copy(&handle)).into()
}
unsafe extern "system" fn SetRenderSurface<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psurface: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRenderSurface(::windows::core::from_raw_borrowed(&psurface)).into()
}
unsafe extern "system" fn UpdateVideo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateVideo(::core::mem::transmute_copy(&psrc), ::core::mem::transmute_copy(&pdst), ::core::mem::transmute_copy(&pborderclr)).into()
}
unsafe extern "system" fn SetSampleCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamsinkindex: u32, pcallback: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSampleCallback(::core::mem::transmute_copy(&dwstreamsinkindex), ::windows::core::from_raw_borrowed(&pcallback)).into()
}
unsafe extern "system" fn GetMirrorState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfmirrorstate: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMirrorState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfmirrorstate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetMirrorState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fmirrorstate: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMirrorState(::core::mem::transmute_copy(&fmirrorstate)).into()
}
unsafe extern "system" fn GetRotation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pdwrotationvalue: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRotation(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwrotationvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRotation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, dwrotationvalue: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRotation(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&dwrotationvalue)).into()
}
unsafe extern "system" fn SetCustomSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmediasink: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCustomSink(::windows::core::from_raw_borrowed(&pmediasink)).into()
}
Self {
base__: IMFCaptureSink_Vtbl::new::<Identity, Impl, OFFSET>(),
SetRenderHandle: SetRenderHandle::<Identity, Impl, OFFSET>,
SetRenderSurface: SetRenderSurface::<Identity, Impl, OFFSET>,
UpdateVideo: UpdateVideo::<Identity, Impl, OFFSET>,
SetSampleCallback: SetSampleCallback::<Identity, Impl, OFFSET>,
GetMirrorState: GetMirrorState::<Identity, Impl, OFFSET>,
SetMirrorState: SetMirrorState::<Identity, Impl, OFFSET>,
GetRotation: GetRotation::<Identity, Impl, OFFSET>,
SetRotation: SetRotation::<Identity, Impl, OFFSET>,
SetCustomSink: SetCustomSink::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCapturePreviewSink as ::windows::core::ComInterface>::IID || iid == &<IMFCaptureSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureRecordSink_Impl: Sized + IMFCaptureSink_Impl {
fn SetOutputByteStream(&self, pbytestream: ::core::option::Option<&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: ::core::option::Option<&IMFCaptureEngineOnSampleCallback>) -> ::windows::core::Result<()>;
fn SetCustomSink(&self, pmediasink: ::core::option::Option<&IMFMediaSink>) -> ::windows::core::Result<()>;
fn GetRotation(&self, dwstreamindex: u32) -> ::windows::core::Result<u32>;
fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureRecordSink {}
impl IMFCaptureRecordSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureRecordSink_Impl, const OFFSET: isize>() -> IMFCaptureRecordSink_Vtbl {
unsafe extern "system" fn SetOutputByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputByteStream(::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute_copy(&guidcontainertype)).into()
}
unsafe extern "system" fn SetOutputFileName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, filename: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputFileName(::core::mem::transmute(&filename)).into()
}
unsafe extern "system" fn SetSampleCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamsinkindex: u32, pcallback: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSampleCallback(::core::mem::transmute_copy(&dwstreamsinkindex), ::windows::core::from_raw_borrowed(&pcallback)).into()
}
unsafe extern "system" fn SetCustomSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmediasink: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCustomSink(::windows::core::from_raw_borrowed(&pmediasink)).into()
}
unsafe extern "system" fn GetRotation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pdwrotationvalue: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRotation(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwrotationvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRotation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, dwrotationvalue: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRotation(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&dwrotationvalue)).into()
}
Self {
base__: IMFCaptureSink_Vtbl::new::<Identity, Impl, OFFSET>(),
SetOutputByteStream: SetOutputByteStream::<Identity, Impl, OFFSET>,
SetOutputFileName: SetOutputFileName::<Identity, Impl, OFFSET>,
SetSampleCallback: SetSampleCallback::<Identity, Impl, OFFSET>,
SetCustomSink: SetCustomSink::<Identity, Impl, OFFSET>,
GetRotation: GetRotation::<Identity, Impl, OFFSET>,
SetRotation: SetRotation::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureRecordSink as ::windows::core::ComInterface>::IID || iid == &<IMFCaptureSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureSink_Impl: Sized {
fn GetOutputMediaType(&self, dwsinkstreamindex: u32, ppmediatype: *mut ::core::option::Option<IMFMediaType>) -> ::windows::core::Result<()>;
fn GetService(&self, dwsinkstreamindex: u32, rguidservice: *const ::windows::core::GUID, riid: *const ::windows::core::GUID, ppunknown: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn AddStream(&self, dwsourcestreamindex: u32, pmediatype: ::core::option::Option<&IMFMediaType>, pattributes: ::core::option::Option<&IMFAttributes>, pdwsinkstreamindex: *mut u32) -> ::windows::core::Result<()>;
fn Prepare(&self) -> ::windows::core::Result<()>;
fn RemoveAllStreams(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureSink {}
impl IMFCaptureSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSink_Impl, const OFFSET: isize>() -> IMFCaptureSink_Vtbl {
unsafe extern "system" fn GetOutputMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsinkstreamindex: u32, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetOutputMediaType(::core::mem::transmute_copy(&dwsinkstreamindex), ::core::mem::transmute_copy(&ppmediatype)).into()
}
unsafe extern "system" fn GetService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetService(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddStream(::core::mem::transmute_copy(&dwsourcestreamindex), ::windows::core::from_raw_borrowed(&pmediatype), ::windows::core::from_raw_borrowed(&pattributes), ::core::mem::transmute_copy(&pdwsinkstreamindex)).into()
}
unsafe extern "system" fn Prepare<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Prepare().into()
}
unsafe extern "system" fn RemoveAllStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllStreams().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetOutputMediaType: GetOutputMediaType::<Identity, Impl, OFFSET>,
GetService: GetService::<Identity, Impl, OFFSET>,
AddStream: AddStream::<Identity, Impl, OFFSET>,
Prepare: Prepare::<Identity, Impl, OFFSET>,
RemoveAllStreams: RemoveAllStreams::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCaptureSink2_Impl: Sized + IMFCaptureSink_Impl {
fn SetOutputMediaType(&self, dwstreamindex: u32, pmediatype: ::core::option::Option<&IMFMediaType>, pencodingattributes: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCaptureSink2 {}
impl IMFCaptureSink2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSink2_Impl, const OFFSET: isize>() -> IMFCaptureSink2_Vtbl {
unsafe extern "system" fn SetOutputMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputMediaType(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&pmediatype), ::windows::core::from_raw_borrowed(&pencodingattributes)).into()
}
Self { base__: IMFCaptureSink_Vtbl::new::<Identity, Impl, OFFSET>(), SetOutputMediaType: SetOutputMediaType::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureSink2 as ::windows::core::ComInterface>::IID || iid == &<IMFCaptureSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFCaptureSource_Impl: Sized {
fn GetCaptureDeviceSource(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: *mut ::core::option::Option<IMFMediaSource>) -> ::windows::core::Result<()>;
fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: *mut ::core::option::Option<IMFActivate>) -> ::windows::core::Result<()>;
fn GetService(&self, rguidservice: *const ::windows::core::GUID, riid: *const ::windows::core::GUID, ppunknown: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn AddEffect(&self, dwsourcestreamindex: u32, punknown: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn RemoveEffect(&self, dwsourcestreamindex: u32, punknown: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn RemoveAllEffects(&self, dwsourcestreamindex: u32) -> ::windows::core::Result<()>;
fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: *mut ::core::option::Option<IMFMediaType>) -> ::windows::core::Result<()>;
fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: ::core::option::Option<&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<super::super::Foundation::BOOL>;
fn SetMirrorState(&self, dwstreamindex: u32, fmirrorstate: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetStreamIndexFromFriendlyName(&self, uifriendlyname: u32) -> ::windows::core::Result<u32>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFCaptureSource {}
#[cfg(feature = "Win32_Foundation")]
impl IMFCaptureSource_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>() -> IMFCaptureSource_Vtbl {
unsafe extern "system" fn GetCaptureDeviceSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCaptureDeviceSource(::core::mem::transmute_copy(&mfcaptureenginedevicetype), ::core::mem::transmute_copy(&ppmediasource)).into()
}
unsafe extern "system" fn GetCaptureDeviceActivate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCaptureDeviceActivate(::core::mem::transmute_copy(&mfcaptureenginedevicetype), ::core::mem::transmute_copy(&ppactivate)).into()
}
unsafe extern "system" fn GetService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetService(::core::mem::transmute_copy(&rguidservice), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppunknown)).into()
}
unsafe extern "system" fn AddEffect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsourcestreamindex: u32, punknown: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEffect(::core::mem::transmute_copy(&dwsourcestreamindex), ::windows::core::from_raw_borrowed(&punknown)).into()
}
unsafe extern "system" fn RemoveEffect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsourcestreamindex: u32, punknown: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveEffect(::core::mem::transmute_copy(&dwsourcestreamindex), ::windows::core::from_raw_borrowed(&punknown)).into()
}
unsafe extern "system" fn RemoveAllEffects<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsourcestreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllEffects(::core::mem::transmute_copy(&dwsourcestreamindex)).into()
}
unsafe extern "system" fn GetAvailableDeviceMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAvailableDeviceMediaType(::core::mem::transmute_copy(&dwsourcestreamindex), ::core::mem::transmute_copy(&dwmediatypeindex), ::core::mem::transmute_copy(&ppmediatype)).into()
}
unsafe extern "system" fn SetCurrentDeviceMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsourcestreamindex: u32, pmediatype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentDeviceMediaType(::core::mem::transmute_copy(&dwsourcestreamindex), ::windows::core::from_raw_borrowed(&pmediatype)).into()
}
unsafe extern "system" fn GetCurrentDeviceMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsourcestreamindex: u32, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentDeviceMediaType(::core::mem::transmute_copy(&dwsourcestreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDeviceStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeviceStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDeviceStreamCategory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsourcestreamindex: u32, pstreamcategory: *mut MF_CAPTURE_ENGINE_STREAM_CATEGORY) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeviceStreamCategory(::core::mem::transmute_copy(&dwsourcestreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pstreamcategory, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMirrorState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pfmirrorstate: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMirrorState(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfmirrorstate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetMirrorState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, fmirrorstate: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMirrorState(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&fmirrorstate)).into()
}
unsafe extern "system" fn GetStreamIndexFromFriendlyName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, uifriendlyname: u32, pdwactualstreamindex: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamIndexFromFriendlyName(::core::mem::transmute_copy(&uifriendlyname)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwactualstreamindex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCaptureDeviceSource: GetCaptureDeviceSource::<Identity, Impl, OFFSET>,
GetCaptureDeviceActivate: GetCaptureDeviceActivate::<Identity, Impl, OFFSET>,
GetService: GetService::<Identity, Impl, OFFSET>,
AddEffect: AddEffect::<Identity, Impl, OFFSET>,
RemoveEffect: RemoveEffect::<Identity, Impl, OFFSET>,
RemoveAllEffects: RemoveAllEffects::<Identity, Impl, OFFSET>,
GetAvailableDeviceMediaType: GetAvailableDeviceMediaType::<Identity, Impl, OFFSET>,
SetCurrentDeviceMediaType: SetCurrentDeviceMediaType::<Identity, Impl, OFFSET>,
GetCurrentDeviceMediaType: GetCurrentDeviceMediaType::<Identity, Impl, OFFSET>,
GetDeviceStreamCount: GetDeviceStreamCount::<Identity, Impl, OFFSET>,
GetDeviceStreamCategory: GetDeviceStreamCategory::<Identity, Impl, OFFSET>,
GetMirrorState: GetMirrorState::<Identity, Impl, OFFSET>,
SetMirrorState: SetMirrorState::<Identity, Impl, OFFSET>,
GetStreamIndexFromFriendlyName: GetStreamIndexFromFriendlyName::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCaptureSource as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCdmSuspendNotify_Impl: Sized {
fn Begin(&self) -> ::windows::core::Result<()>;
fn End(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCdmSuspendNotify {}
impl IMFCdmSuspendNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCdmSuspendNotify_Impl, const OFFSET: isize>() -> IMFCdmSuspendNotify_Vtbl {
unsafe extern "system" fn Begin<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCdmSuspendNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Begin().into()
}
unsafe extern "system" fn End<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCdmSuspendNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.End().into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Begin: Begin::<Identity, Impl, OFFSET>, End: End::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCdmSuspendNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFClock_Impl: Sized {
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 ::windows::core::RuntimeName for IMFClock {}
impl IMFClock_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClock_Impl, const OFFSET: isize>() -> IMFClock_Vtbl {
unsafe extern "system" fn GetClockCharacteristics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcharacteristics: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetClockCharacteristics() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcharacteristics, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCorrelatedTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwreserved: u32, pllclocktime: *mut i64, phnssystemtime: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCorrelatedTime(::core::mem::transmute_copy(&dwreserved), ::core::mem::transmute_copy(&pllclocktime), ::core::mem::transmute_copy(&phnssystemtime)).into()
}
unsafe extern "system" fn GetContinuityKey<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcontinuitykey: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetContinuityKey() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcontinuitykey, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwreserved: u32, peclockstate: *mut MFCLOCK_STATE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetState(::core::mem::transmute_copy(&dwreserved)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(peclockstate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProperties<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pclockproperties: *mut MFCLOCK_PROPERTIES) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProperties(::core::mem::transmute_copy(&pclockproperties)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetClockCharacteristics: GetClockCharacteristics::<Identity, Impl, OFFSET>,
GetCorrelatedTime: GetCorrelatedTime::<Identity, Impl, OFFSET>,
GetContinuityKey: GetContinuityKey::<Identity, Impl, OFFSET>,
GetState: GetState::<Identity, Impl, OFFSET>,
GetProperties: GetProperties::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFClock as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFClockConsumer_Impl: Sized {
fn SetPresentationClock(&self, ppresentationclock: ::core::option::Option<&IMFPresentationClock>) -> ::windows::core::Result<()>;
fn GetPresentationClock(&self) -> ::windows::core::Result<IMFPresentationClock>;
}
impl ::windows::core::RuntimeName for IMFClockConsumer {}
impl IMFClockConsumer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockConsumer_Impl, const OFFSET: isize>() -> IMFClockConsumer_Vtbl {
unsafe extern "system" fn SetPresentationClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockConsumer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppresentationclock: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPresentationClock(::windows::core::from_raw_borrowed(&ppresentationclock)).into()
}
unsafe extern "system" fn GetPresentationClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockConsumer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pppresentationclock: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPresentationClock() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pppresentationclock, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetPresentationClock: SetPresentationClock::<Identity, Impl, OFFSET>,
GetPresentationClock: GetPresentationClock::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFClockConsumer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFClockStateSink_Impl: Sized {
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 ::windows::core::RuntimeName for IMFClockStateSink {}
impl IMFClockStateSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockStateSink_Impl, const OFFSET: isize>() -> IMFClockStateSink_Vtbl {
unsafe extern "system" fn OnClockStart<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssystemtime: i64, llclockstartoffset: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnClockStart(::core::mem::transmute_copy(&hnssystemtime), ::core::mem::transmute_copy(&llclockstartoffset)).into()
}
unsafe extern "system" fn OnClockStop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssystemtime: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnClockStop(::core::mem::transmute_copy(&hnssystemtime)).into()
}
unsafe extern "system" fn OnClockPause<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssystemtime: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnClockPause(::core::mem::transmute_copy(&hnssystemtime)).into()
}
unsafe extern "system" fn OnClockRestart<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssystemtime: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnClockRestart(::core::mem::transmute_copy(&hnssystemtime)).into()
}
unsafe extern "system" fn OnClockSetRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssystemtime: i64, flrate: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnClockSetRate(::core::mem::transmute_copy(&hnssystemtime), ::core::mem::transmute_copy(&flrate)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnClockStart: OnClockStart::<Identity, Impl, OFFSET>,
OnClockStop: OnClockStop::<Identity, Impl, OFFSET>,
OnClockPause: OnClockPause::<Identity, Impl, OFFSET>,
OnClockRestart: OnClockRestart::<Identity, Impl, OFFSET>,
OnClockSetRate: OnClockSetRate::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFClockStateSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFCollection_Impl: Sized {
fn GetElementCount(&self) -> ::windows::core::Result<u32>;
fn GetElement(&self, dwelementindex: u32) -> ::windows::core::Result<::windows::core::IUnknown>;
fn AddElement(&self, punkelement: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn RemoveElement(&self, dwelementindex: u32) -> ::windows::core::Result<::windows::core::IUnknown>;
fn InsertElementAt(&self, dwindex: u32, punknown: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn RemoveAllElements(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFCollection {}
impl IMFCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>() -> IMFCollection_Vtbl {
unsafe extern "system" fn GetElementCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcelements: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetElementCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcelements, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetElement<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwelementindex: u32, ppunkelement: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetElement(::core::mem::transmute_copy(&dwelementindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppunkelement, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddElement<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punkelement: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddElement(::windows::core::from_raw_borrowed(&punkelement)).into()
}
unsafe extern "system" fn RemoveElement<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwelementindex: u32, ppunkelement: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoveElement(::core::mem::transmute_copy(&dwelementindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppunkelement, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InsertElementAt<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, punknown: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InsertElementAt(::core::mem::transmute_copy(&dwindex), ::windows::core::from_raw_borrowed(&punknown)).into()
}
unsafe extern "system" fn RemoveAllElements<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllElements().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetElementCount: GetElementCount::<Identity, Impl, OFFSET>,
GetElement: GetElement::<Identity, Impl, OFFSET>,
AddElement: AddElement::<Identity, Impl, OFFSET>,
RemoveElement: RemoveElement::<Identity, Impl, OFFSET>,
InsertElementAt: InsertElementAt::<Identity, Impl, OFFSET>,
RemoveAllElements: RemoveAllElements::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFCollection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFContentDecryptionModule_Impl: Sized {
fn SetContentEnabler(&self, contentenabler: ::core::option::Option<&IMFContentEnabler>, result: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
fn GetSuspendNotify(&self) -> ::windows::core::Result<IMFCdmSuspendNotify>;
fn SetPMPHostApp(&self, pmphostapp: ::core::option::Option<&IMFPMPHostApp>) -> ::windows::core::Result<()>;
fn CreateSession(&self, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFContentDecryptionModule {}
impl IMFContentDecryptionModule_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModule_Impl, const OFFSET: isize>() -> IMFContentDecryptionModule_Vtbl {
unsafe extern "system" fn SetContentEnabler<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetContentEnabler(::windows::core::from_raw_borrowed(&contentenabler), ::windows::core::from_raw_borrowed(&result)).into()
}
unsafe extern "system" fn GetSuspendNotify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, notify: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSuspendNotify() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(notify, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetPMPHostApp<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmphostapp: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPMPHostApp(::windows::core::from_raw_borrowed(&pmphostapp)).into()
}
unsafe extern "system" fn CreateSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateSession(::core::mem::transmute_copy(&sessiontype), ::windows::core::from_raw_borrowed(&callbacks)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(session, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetServerCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, certificate: *const u8, certificatesize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetServerCertificate(::core::mem::transmute_copy(&certificate), ::core::mem::transmute_copy(&certificatesize)).into()
}
unsafe extern "system" fn CreateTrustedInput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateTrustedInput(::core::mem::transmute_copy(&contentinitdata), ::core::mem::transmute_copy(&contentinitdatasize)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(trustedinput, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProtectionSystemIds<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, systemids: *mut *mut ::windows::core::GUID, count: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectionSystemIds(::core::mem::transmute_copy(&systemids), ::core::mem::transmute_copy(&count)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetContentEnabler: SetContentEnabler::<Identity, Impl, OFFSET>,
GetSuspendNotify: GetSuspendNotify::<Identity, Impl, OFFSET>,
SetPMPHostApp: SetPMPHostApp::<Identity, Impl, OFFSET>,
CreateSession: CreateSession::<Identity, Impl, OFFSET>,
SetServerCertificate: SetServerCertificate::<Identity, Impl, OFFSET>,
CreateTrustedInput: CreateTrustedInput::<Identity, Impl, OFFSET>,
GetProtectionSystemIds: GetProtectionSystemIds::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentDecryptionModule as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFContentDecryptionModuleAccess_Impl: Sized {
fn CreateContentDecryptionModule(&self, contentdecryptionmoduleproperties: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFContentDecryptionModuleAccess {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFContentDecryptionModuleAccess_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>() -> IMFContentDecryptionModuleAccess_Vtbl {
unsafe extern "system" fn CreateContentDecryptionModule<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateContentDecryptionModule(::windows::core::from_raw_borrowed(&contentdecryptionmoduleproperties)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(contentdecryptionmodule, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, configuration: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetConfiguration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(configuration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetKeySystem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetKeySystem() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(keysystem, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateContentDecryptionModule: CreateContentDecryptionModule::<Identity, Impl, OFFSET>,
GetConfiguration: GetConfiguration::<Identity, Impl, OFFSET>,
GetKeySystem: GetKeySystem::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleAccess as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub trait IMFContentDecryptionModuleFactory_Impl: Sized {
fn IsTypeSupported(&self, keysystem: &::windows::core::PCWSTR, contenttype: &::windows::core::PCWSTR) -> super::super::Foundation::BOOL;
fn CreateContentDecryptionModuleAccess(&self, keysystem: &::windows::core::PCWSTR, configurations: *const ::core::option::Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, numconfigurations: u32) -> ::windows::core::Result<IMFContentDecryptionModuleAccess>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
impl ::windows::core::RuntimeName for IMFContentDecryptionModuleFactory {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
impl IMFContentDecryptionModuleFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleFactory_Impl, const OFFSET: isize>() -> IMFContentDecryptionModuleFactory_Vtbl {
unsafe extern "system" fn IsTypeSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: ::windows::core::PCWSTR, contenttype: ::windows::core::PCWSTR) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsTypeSupported(::core::mem::transmute(&keysystem), ::core::mem::transmute(&contenttype))
}
unsafe extern "system" fn CreateContentDecryptionModuleAccess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateContentDecryptionModuleAccess(::core::mem::transmute(&keysystem), ::core::mem::transmute_copy(&configurations), ::core::mem::transmute_copy(&numconfigurations)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(contentdecryptionmoduleaccess, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsTypeSupported: IsTypeSupported::<Identity, Impl, OFFSET>,
CreateContentDecryptionModuleAccess: CreateContentDecryptionModuleAccess::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFContentDecryptionModuleSession_Impl: Sized {
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<super::super::Foundation::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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFContentDecryptionModuleSession {}
#[cfg(feature = "Win32_Foundation")]
impl IMFContentDecryptionModuleSession_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>() -> IMFContentDecryptionModuleSession_Vtbl {
unsafe extern "system" fn GetSessionId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, sessionid: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSessionId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(sessionid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetExpiration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, expiration: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetExpiration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(expiration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetKeyStatuses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keystatuses: *mut *mut MFMediaKeyStatus, numkeystatuses: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetKeyStatuses(::core::mem::transmute_copy(&keystatuses), ::core::mem::transmute_copy(&numkeystatuses)).into()
}
unsafe extern "system" fn Load<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, sessionid: ::windows::core::PCWSTR, loaded: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Load(::core::mem::transmute(&sessionid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(loaded, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GenerateRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, initdatatype: ::windows::core::PCWSTR, initdata: *const u8, initdatasize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GenerateRequest(::core::mem::transmute(&initdatatype), ::core::mem::transmute_copy(&initdata), ::core::mem::transmute_copy(&initdatasize)).into()
}
unsafe extern "system" fn Update<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, response: *const u8, responsesize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Update(::core::mem::transmute_copy(&response), ::core::mem::transmute_copy(&responsesize)).into()
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSessionId: GetSessionId::<Identity, Impl, OFFSET>,
GetExpiration: GetExpiration::<Identity, Impl, OFFSET>,
GetKeyStatuses: GetKeyStatuses::<Identity, Impl, OFFSET>,
Load: Load::<Identity, Impl, OFFSET>,
GenerateRequest: GenerateRequest::<Identity, Impl, OFFSET>,
Update: Update::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleSession as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFContentDecryptionModuleSessionCallbacks_Impl: Sized {
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 ::windows::core::RuntimeName for IMFContentDecryptionModuleSessionCallbacks {}
impl IMFContentDecryptionModuleSessionCallbacks_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSessionCallbacks_Impl, const OFFSET: isize>() -> IMFContentDecryptionModuleSessionCallbacks_Vtbl {
unsafe extern "system" fn KeyMessage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyMessage(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptionModuleSessionCallbacks_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyStatusChanged().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
KeyMessage: KeyMessage::<Identity, Impl, OFFSET>,
KeyStatusChanged: KeyStatusChanged::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleSessionCallbacks as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFContentDecryptorContext_Impl: Sized {
fn InitializeHardwareKey(&self, inputprivatedatabytecount: u32, inputprivatedata: *const ::core::ffi::c_void) -> ::windows::core::Result<u64>;
}
impl ::windows::core::RuntimeName for IMFContentDecryptorContext {}
impl IMFContentDecryptorContext_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentDecryptorContext_Impl, const OFFSET: isize>() -> IMFContentDecryptorContext_Vtbl {
unsafe extern "system" fn InitializeHardwareKey<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InitializeHardwareKey(::core::mem::transmute_copy(&inputprivatedatabytecount), ::core::mem::transmute_copy(&inputprivatedata)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(outputprivatedata, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), InitializeHardwareKey: InitializeHardwareKey::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentDecryptorContext as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFContentEnabler_Impl: Sized {
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<super::super::Foundation::BOOL>;
fn AutomaticEnable(&self) -> ::windows::core::Result<()>;
fn MonitorEnable(&self) -> ::windows::core::Result<()>;
fn Cancel(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFContentEnabler {}
#[cfg(feature = "Win32_Foundation")]
impl IMFContentEnabler_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>() -> IMFContentEnabler_Vtbl {
unsafe extern "system" fn GetEnableType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEnableType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetEnableURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEnableURL(::core::mem::transmute_copy(&ppwszurl), ::core::mem::transmute_copy(&pcchurl), ::core::mem::transmute_copy(&ptruststatus)).into()
}
unsafe extern "system" fn GetEnableData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEnableData(::core::mem::transmute_copy(&ppbdata), ::core::mem::transmute_copy(&pcbdata)).into()
}
unsafe extern "system" fn IsAutomaticSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfautomatic: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsAutomaticSupported() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfautomatic, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AutomaticEnable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AutomaticEnable().into()
}
unsafe extern "system" fn MonitorEnable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MonitorEnable().into()
}
unsafe extern "system" fn Cancel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cancel().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEnableType: GetEnableType::<Identity, Impl, OFFSET>,
GetEnableURL: GetEnableURL::<Identity, Impl, OFFSET>,
GetEnableData: GetEnableData::<Identity, Impl, OFFSET>,
IsAutomaticSupported: IsAutomaticSupported::<Identity, Impl, OFFSET>,
AutomaticEnable: AutomaticEnable::<Identity, Impl, OFFSET>,
MonitorEnable: MonitorEnable::<Identity, Impl, OFFSET>,
Cancel: Cancel::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentEnabler as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFContentProtectionDevice_Impl: Sized {
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 ::windows::core::RuntimeName for IMFContentProtectionDevice {}
impl IMFContentProtectionDevice_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentProtectionDevice_Impl, const OFFSET: isize>() -> IMFContentProtectionDevice_Vtbl {
unsafe extern "system" fn InvokeFunction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InvokeFunction(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentProtectionDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, privateinputbytecount: *mut u32, privateoutputbytecount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPrivateDataByteCount(::core::mem::transmute_copy(&privateinputbytecount), ::core::mem::transmute_copy(&privateoutputbytecount)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InvokeFunction: InvokeFunction::<Identity, Impl, OFFSET>,
GetPrivateDataByteCount: GetPrivateDataByteCount::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentProtectionDevice as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFContentProtectionManager_Impl: Sized {
fn BeginEnableContent(&self, penableractivate: ::core::option::Option<&IMFActivate>, ptopo: ::core::option::Option<&IMFTopology>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndEnableContent(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFContentProtectionManager {}
impl IMFContentProtectionManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentProtectionManager_Impl, const OFFSET: isize>() -> IMFContentProtectionManager_Vtbl {
unsafe extern "system" fn BeginEnableContent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginEnableContent(::windows::core::from_raw_borrowed(&penableractivate), ::windows::core::from_raw_borrowed(&ptopo), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndEnableContent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFContentProtectionManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndEnableContent(::windows::core::from_raw_borrowed(&presult)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginEnableContent: BeginEnableContent::<Identity, Impl, OFFSET>,
EndEnableContent: EndEnableContent::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFContentProtectionManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFD3D12SynchronizationObject_Impl: Sized {
fn SignalEventOnFinalResourceRelease(&self, hevent: super::super::Foundation::HANDLE) -> ::windows::core::Result<()>;
fn Reset(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFD3D12SynchronizationObject {}
#[cfg(feature = "Win32_Foundation")]
impl IMFD3D12SynchronizationObject_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObject_Impl, const OFFSET: isize>() -> IMFD3D12SynchronizationObject_Vtbl {
unsafe extern "system" fn SignalEventOnFinalResourceRelease<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObject_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hevent: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SignalEventOnFinalResourceRelease(::core::mem::transmute_copy(&hevent)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObject_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SignalEventOnFinalResourceRelease: SignalEventOnFinalResourceRelease::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFD3D12SynchronizationObject as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
pub trait IMFD3D12SynchronizationObjectCommands_Impl: Sized {
fn EnqueueResourceReady(&self, pproducercommandqueue: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> ::windows::core::Result<()>;
fn EnqueueResourceReadyWait(&self, pconsumercommandqueue: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> ::windows::core::Result<()>;
fn SignalEventOnResourceReady(&self, hevent: super::super::Foundation::HANDLE) -> ::windows::core::Result<()>;
fn EnqueueResourceRelease(&self, pconsumercommandqueue: ::core::option::Option<&super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl ::windows::core::RuntimeName for IMFD3D12SynchronizationObjectCommands {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))]
impl IMFD3D12SynchronizationObjectCommands_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>() -> IMFD3D12SynchronizationObjectCommands_Vtbl {
unsafe extern "system" fn EnqueueResourceReady<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pproducercommandqueue: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnqueueResourceReady(::windows::core::from_raw_borrowed(&pproducercommandqueue)).into()
}
unsafe extern "system" fn EnqueueResourceReadyWait<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pconsumercommandqueue: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnqueueResourceReadyWait(::windows::core::from_raw_borrowed(&pconsumercommandqueue)).into()
}
unsafe extern "system" fn SignalEventOnResourceReady<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hevent: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SignalEventOnResourceReady(::core::mem::transmute_copy(&hevent)).into()
}
unsafe extern "system" fn EnqueueResourceRelease<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pconsumercommandqueue: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnqueueResourceRelease(::windows::core::from_raw_borrowed(&pconsumercommandqueue)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
EnqueueResourceReady: EnqueueResourceReady::<Identity, Impl, OFFSET>,
EnqueueResourceReadyWait: EnqueueResourceReadyWait::<Identity, Impl, OFFSET>,
SignalEventOnResourceReady: SignalEventOnResourceReady::<Identity, Impl, OFFSET>,
EnqueueResourceRelease: EnqueueResourceRelease::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFD3D12SynchronizationObjectCommands as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFDLNASinkInit_Impl: Sized {
fn Initialize(&self, pbytestream: ::core::option::Option<&IMFByteStream>, fpal: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFDLNASinkInit {}
#[cfg(feature = "Win32_Foundation")]
impl IMFDLNASinkInit_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDLNASinkInit_Impl, const OFFSET: isize>() -> IMFDLNASinkInit_Vtbl {
unsafe extern "system" fn Initialize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDLNASinkInit_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbytestream: *mut ::core::ffi::c_void, fpal: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Initialize(::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute_copy(&fpal)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Initialize: Initialize::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDLNASinkInit as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFDRMNetHelper_Impl: Sized {
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 ::windows::core::RuntimeName for IMFDRMNetHelper {}
impl IMFDRMNetHelper_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDRMNetHelper_Impl, const OFFSET: isize>() -> IMFDRMNetHelper_Vtbl {
unsafe extern "system" fn ProcessLicenseRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessLicenseRequest(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDRMNetHelper_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetChainedLicenseResponse(::core::mem::transmute_copy(&pplicenseresponse), ::core::mem::transmute_copy(&pcblicenseresponse)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ProcessLicenseRequest: ProcessLicenseRequest::<Identity, Impl, OFFSET>,
GetChainedLicenseResponse: GetChainedLicenseResponse::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDRMNetHelper as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFDXGIBuffer_Impl: Sized {
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: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFDXGIBuffer {}
impl IMFDXGIBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIBuffer_Impl, const OFFSET: isize>() -> IMFDXGIBuffer_Vtbl {
unsafe extern "system" fn GetResource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetResource(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvobject)).into()
}
unsafe extern "system" fn GetSubresourceIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pusubresource: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSubresourceIndex() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pusubresource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetUnknown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetUnknown(::core::mem::transmute_copy(&guid), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvobject)).into()
}
unsafe extern "system" fn SetUnknown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUnknown(::core::mem::transmute_copy(&guid), ::windows::core::from_raw_borrowed(&punkdata)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetResource: GetResource::<Identity, Impl, OFFSET>,
GetSubresourceIndex: GetSubresourceIndex::<Identity, Impl, OFFSET>,
GetUnknown: GetUnknown::<Identity, Impl, OFFSET>,
SetUnknown: SetUnknown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDXGIBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFDXGIDeviceManager_Impl: Sized {
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: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn OpenDeviceHandle(&self) -> ::windows::core::Result<super::super::Foundation::HANDLE>;
fn ResetDevice(&self, punkdevice: ::core::option::Option<&::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: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFDXGIDeviceManager {}
#[cfg(feature = "Win32_Foundation")]
impl IMFDXGIDeviceManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManager_Impl, const OFFSET: isize>() -> IMFDXGIDeviceManager_Vtbl {
unsafe extern "system" fn CloseDeviceHandle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CloseDeviceHandle(::core::mem::transmute_copy(&hdevice)).into()
}
unsafe extern "system" fn GetVideoService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoService(::core::mem::transmute_copy(&hdevice), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppservice)).into()
}
unsafe extern "system" fn LockDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockDevice(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phdevice: *mut super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.OpenDeviceHandle() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phdevice, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ResetDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punkdevice: *mut ::core::ffi::c_void, resettoken: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResetDevice(::windows::core::from_raw_borrowed(&punkdevice), ::core::mem::transmute_copy(&resettoken)).into()
}
unsafe extern "system" fn TestDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TestDevice(::core::mem::transmute_copy(&hdevice)).into()
}
unsafe extern "system" fn UnlockDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, fsavestate: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockDevice(::core::mem::transmute_copy(&hdevice), ::core::mem::transmute_copy(&fsavestate)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CloseDeviceHandle: CloseDeviceHandle::<Identity, Impl, OFFSET>,
GetVideoService: GetVideoService::<Identity, Impl, OFFSET>,
LockDevice: LockDevice::<Identity, Impl, OFFSET>,
OpenDeviceHandle: OpenDeviceHandle::<Identity, Impl, OFFSET>,
ResetDevice: ResetDevice::<Identity, Impl, OFFSET>,
TestDevice: TestDevice::<Identity, Impl, OFFSET>,
UnlockDevice: UnlockDevice::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDXGIDeviceManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFDXGIDeviceManagerSource_Impl: Sized {
fn GetManager(&self) -> ::windows::core::Result<IMFDXGIDeviceManager>;
}
impl ::windows::core::RuntimeName for IMFDXGIDeviceManagerSource {}
impl IMFDXGIDeviceManagerSource_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManagerSource_Impl, const OFFSET: isize>() -> IMFDXGIDeviceManagerSource_Vtbl {
unsafe extern "system" fn GetManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDXGIDeviceManagerSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmanager: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetManager() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmanager, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetManager: GetManager::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDXGIDeviceManagerSource as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFDesiredSample_Impl: Sized {
fn GetDesiredSampleTimeAndDuration(&self, phnssampletime: *mut i64, phnssampleduration: *mut i64) -> ::windows::core::Result<()>;
fn SetDesiredSampleTimeAndDuration(&self, hnssampletime: i64, hnssampleduration: i64);
fn Clear(&self);
}
impl ::windows::core::RuntimeName for IMFDesiredSample {}
impl IMFDesiredSample_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDesiredSample_Impl, const OFFSET: isize>() -> IMFDesiredSample_Vtbl {
unsafe extern "system" fn GetDesiredSampleTimeAndDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDesiredSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phnssampletime: *mut i64, phnssampleduration: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDesiredSampleTimeAndDuration(::core::mem::transmute_copy(&phnssampletime), ::core::mem::transmute_copy(&phnssampleduration)).into()
}
unsafe extern "system" fn SetDesiredSampleTimeAndDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDesiredSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssampletime: i64, hnssampleduration: i64) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDesiredSampleTimeAndDuration(::core::mem::transmute_copy(&hnssampletime), ::core::mem::transmute_copy(&hnssampleduration))
}
unsafe extern "system" fn Clear<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDesiredSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Clear()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDesiredSampleTimeAndDuration: GetDesiredSampleTimeAndDuration::<Identity, Impl, OFFSET>,
SetDesiredSampleTimeAndDuration: SetDesiredSampleTimeAndDuration::<Identity, Impl, OFFSET>,
Clear: Clear::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDesiredSample as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFDeviceTransform_Impl: Sized {
fn InitializeTransform(&self, pattributes: ::core::option::Option<&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: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
fn ProcessInput(&self, dwinputstreamid: u32, psample: ::core::option::Option<&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: ::core::option::Option<&IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> ::windows::core::Result<()>;
fn GetInputStreamState(&self, dwstreamid: u32) -> ::windows::core::Result<DeviceStreamState>;
fn SetOutputStreamState(&self, dwstreamid: u32, pmediatype: ::core::option::Option<&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: *mut ::core::option::Option<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 ::windows::core::RuntimeName for IMFDeviceTransform {}
impl IMFDeviceTransform_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>() -> IMFDeviceTransform_Vtbl {
unsafe extern "system" fn InitializeTransform<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pattributes: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeTransform(::windows::core::from_raw_borrowed(&pattributes)).into()
}
unsafe extern "system" fn GetInputAvailableType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputAvailableType(::core::mem::transmute_copy(&dwinputstreamid), ::core::mem::transmute_copy(&dwtypeindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetInputCurrentType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputCurrentType(::core::mem::transmute_copy(&dwinputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetInputStreamAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputStreamAttributes(::core::mem::transmute_copy(&dwinputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputAvailableType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputAvailableType(::core::mem::transmute_copy(&dwoutputstreamid), ::core::mem::transmute_copy(&dwtypeindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputCurrentType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, pmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputCurrentType(::core::mem::transmute_copy(&dwoutputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputStreamAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStreamAttributes(::core::mem::transmute_copy(&dwoutputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamCount(::core::mem::transmute_copy(&pcinputstreams), ::core::mem::transmute_copy(&pcoutputstreams)).into()
}
unsafe extern "system" fn GetStreamIDs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputidarraysize: u32, pdwinputstreamids: *mut u32, dwoutputidarraysize: u32, pdwoutputstreamids: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamIDs(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessEvent(::core::mem::transmute_copy(&dwinputstreamid), ::windows::core::from_raw_borrowed(&pevent)).into()
}
unsafe extern "system" fn ProcessInput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, psample: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessInput(::core::mem::transmute_copy(&dwinputstreamid), ::windows::core::from_raw_borrowed(&psample), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn ProcessMessage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessMessage(::core::mem::transmute_copy(&emessage), ::core::mem::transmute_copy(&ulparam)).into()
}
unsafe extern "system" fn ProcessOutput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessOutput(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInputStreamState(::core::mem::transmute_copy(&dwstreamid), ::windows::core::from_raw_borrowed(&pmediatype), ::core::mem::transmute_copy(&value), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn GetInputStreamState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputStreamState(::core::mem::transmute_copy(&dwstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetOutputStreamState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputStreamState(::core::mem::transmute_copy(&dwstreamid), ::windows::core::from_raw_borrowed(&pmediatype), ::core::mem::transmute_copy(&value), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn GetOutputStreamState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStreamState(::core::mem::transmute_copy(&dwstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetInputStreamPreferredState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetInputStreamPreferredState(::core::mem::transmute_copy(&dwstreamid), ::core::mem::transmute_copy(&value), ::core::mem::transmute_copy(&ppmediatype)).into()
}
unsafe extern "system" fn FlushInputStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FlushInputStream(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn FlushOutputStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FlushOutputStream(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&dwflags)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InitializeTransform: InitializeTransform::<Identity, Impl, OFFSET>,
GetInputAvailableType: GetInputAvailableType::<Identity, Impl, OFFSET>,
GetInputCurrentType: GetInputCurrentType::<Identity, Impl, OFFSET>,
GetInputStreamAttributes: GetInputStreamAttributes::<Identity, Impl, OFFSET>,
GetOutputAvailableType: GetOutputAvailableType::<Identity, Impl, OFFSET>,
GetOutputCurrentType: GetOutputCurrentType::<Identity, Impl, OFFSET>,
GetOutputStreamAttributes: GetOutputStreamAttributes::<Identity, Impl, OFFSET>,
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetStreamIDs: GetStreamIDs::<Identity, Impl, OFFSET>,
ProcessEvent: ProcessEvent::<Identity, Impl, OFFSET>,
ProcessInput: ProcessInput::<Identity, Impl, OFFSET>,
ProcessMessage: ProcessMessage::<Identity, Impl, OFFSET>,
ProcessOutput: ProcessOutput::<Identity, Impl, OFFSET>,
SetInputStreamState: SetInputStreamState::<Identity, Impl, OFFSET>,
GetInputStreamState: GetInputStreamState::<Identity, Impl, OFFSET>,
SetOutputStreamState: SetOutputStreamState::<Identity, Impl, OFFSET>,
GetOutputStreamState: GetOutputStreamState::<Identity, Impl, OFFSET>,
GetInputStreamPreferredState: GetInputStreamPreferredState::<Identity, Impl, OFFSET>,
FlushInputStream: FlushInputStream::<Identity, Impl, OFFSET>,
FlushOutputStream: FlushOutputStream::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDeviceTransform as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFDeviceTransformCallback_Impl: Sized {
fn OnBufferSent(&self, pcallbackattributes: ::core::option::Option<&IMFAttributes>, pinid: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFDeviceTransformCallback {}
impl IMFDeviceTransformCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransformCallback_Impl, const OFFSET: isize>() -> IMFDeviceTransformCallback_Vtbl {
unsafe extern "system" fn OnBufferSent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFDeviceTransformCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcallbackattributes: *mut ::core::ffi::c_void, pinid: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnBufferSent(::windows::core::from_raw_borrowed(&pcallbackattributes), ::core::mem::transmute_copy(&pinid)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnBufferSent: OnBufferSent::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFDeviceTransformCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedCameraControl_Impl: Sized {
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 ::windows::core::RuntimeName for IMFExtendedCameraControl {}
impl IMFExtendedCameraControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>() -> IMFExtendedCameraControl_Vtbl {
unsafe extern "system" fn GetCapabilities<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCapabilities()
}
unsafe extern "system" fn SetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ulflags: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFlags(::core::mem::transmute_copy(&ulflags)).into()
}
unsafe extern "system" fn GetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetFlags()
}
unsafe extern "system" fn LockPayload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pppayload: *mut *mut u8, pulpayload: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockPayload(::core::mem::transmute_copy(&pppayload), ::core::mem::transmute_copy(&pulpayload)).into()
}
unsafe extern "system" fn UnlockPayload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockPayload().into()
}
unsafe extern "system" fn CommitSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CommitSettings().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCapabilities: GetCapabilities::<Identity, Impl, OFFSET>,
SetFlags: SetFlags::<Identity, Impl, OFFSET>,
GetFlags: GetFlags::<Identity, Impl, OFFSET>,
LockPayload: LockPayload::<Identity, Impl, OFFSET>,
UnlockPayload: UnlockPayload::<Identity, Impl, OFFSET>,
CommitSettings: CommitSettings::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedCameraControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedCameraController_Impl: Sized {
fn GetExtendedCameraControl(&self, dwstreamindex: u32, ulpropertyid: u32) -> ::windows::core::Result<IMFExtendedCameraControl>;
}
impl ::windows::core::RuntimeName for IMFExtendedCameraController {}
impl IMFExtendedCameraController_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraController_Impl, const OFFSET: isize>() -> IMFExtendedCameraController_Vtbl {
unsafe extern "system" fn GetExtendedCameraControl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetExtendedCameraControl(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&ulpropertyid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcontrol, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetExtendedCameraControl: GetExtendedCameraControl::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedCameraController as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedCameraIntrinsicModel_Impl: Sized {
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 ::windows::core::RuntimeName for IMFExtendedCameraIntrinsicModel {}
impl IMFExtendedCameraIntrinsicModel_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>() -> IMFExtendedCameraIntrinsicModel_Vtbl {
unsafe extern "system" fn GetModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pintrinsicmodel: *mut MFExtendedCameraIntrinsic_IntrinsicModel) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetModel(::core::mem::transmute_copy(&pintrinsicmodel)).into()
}
unsafe extern "system" fn SetModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pintrinsicmodel: *const MFExtendedCameraIntrinsic_IntrinsicModel) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetModel(::core::mem::transmute_copy(&pintrinsicmodel)).into()
}
unsafe extern "system" fn GetDistortionModelType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdistortionmodeltype: *mut MFCameraIntrinsic_DistortionModelType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDistortionModelType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdistortionmodeltype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetModel: GetModel::<Identity, Impl, OFFSET>,
SetModel: SetModel::<Identity, Impl, OFFSET>,
GetDistortionModelType: GetDistortionModelType::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsicModel as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedCameraIntrinsics_Impl: Sized {
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: ::core::option::Option<&IMFExtendedCameraIntrinsicModel>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFExtendedCameraIntrinsics {}
impl IMFExtendedCameraIntrinsics_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>() -> IMFExtendedCameraIntrinsics_Vtbl {
unsafe extern "system" fn InitializeFromBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbbuffer: *const u8, dwbuffersize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeFromBuffer(::core::mem::transmute_copy(&pbbuffer), ::core::mem::transmute_copy(&dwbuffersize)).into()
}
unsafe extern "system" fn GetBufferSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwbuffersize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBufferSize() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwbuffersize, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SerializeToBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbbuffer: *mut u8, pdwbuffersize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SerializeToBuffer(::core::mem::transmute_copy(&pbbuffer), ::core::mem::transmute_copy(&pdwbuffersize)).into()
}
unsafe extern "system" fn GetIntrinsicModelCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIntrinsicModelCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetIntrinsicModelByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppintrinsicmodel: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIntrinsicModelByIndex(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppintrinsicmodel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddIntrinsicModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pintrinsicmodel: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddIntrinsicModel(::windows::core::from_raw_borrowed(&pintrinsicmodel)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InitializeFromBuffer: InitializeFromBuffer::<Identity, Impl, OFFSET>,
GetBufferSize: GetBufferSize::<Identity, Impl, OFFSET>,
SerializeToBuffer: SerializeToBuffer::<Identity, Impl, OFFSET>,
GetIntrinsicModelCount: GetIntrinsicModelCount::<Identity, Impl, OFFSET>,
GetIntrinsicModelByIndex: GetIntrinsicModelByIndex::<Identity, Impl, OFFSET>,
AddIntrinsicModel: AddIntrinsicModel::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsics as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl: Sized {
fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModel6KT) -> ::windows::core::Result<()>;
fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModel6KT) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFExtendedCameraIntrinsicsDistortionModel6KT {}
impl IMFExtendedCameraIntrinsicsDistortionModel6KT_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl, const OFFSET: isize>() -> IMFExtendedCameraIntrinsicsDistortionModel6KT_Vtbl {
unsafe extern "system" fn GetDistortionModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModel6KT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDistortionModel(::core::mem::transmute_copy(&pdistortionmodel)).into()
}
unsafe extern "system" fn SetDistortionModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdistortionmodel: *const MFCameraIntrinsic_DistortionModel6KT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDistortionModel(::core::mem::transmute_copy(&pdistortionmodel)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDistortionModel: GetDistortionModel::<Identity, Impl, OFFSET>,
SetDistortionModel: SetDistortionModel::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsicsDistortionModel6KT as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl: Sized {
fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModelArcTan) -> ::windows::core::Result<()>;
fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModelArcTan) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFExtendedCameraIntrinsicsDistortionModelArcTan {}
impl IMFExtendedCameraIntrinsicsDistortionModelArcTan_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl, const OFFSET: isize>() -> IMFExtendedCameraIntrinsicsDistortionModelArcTan_Vtbl {
unsafe extern "system" fn GetDistortionModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModelArcTan) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDistortionModel(::core::mem::transmute_copy(&pdistortionmodel)).into()
}
unsafe extern "system" fn SetDistortionModel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdistortionmodel: *const MFCameraIntrinsic_DistortionModelArcTan) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDistortionModel(::core::mem::transmute_copy(&pdistortionmodel)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDistortionModel: GetDistortionModel::<Identity, Impl, OFFSET>,
SetDistortionModel: SetDistortionModel::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsicsDistortionModelArcTan as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFExtendedDRMTypeSupport_Impl: Sized {
fn IsTypeSupportedEx(&self, r#type: &::windows::core::BSTR, keysystem: &::windows::core::BSTR) -> ::windows::core::Result<MF_MEDIA_ENGINE_CANPLAY>;
}
impl ::windows::core::RuntimeName for IMFExtendedDRMTypeSupport {}
impl IMFExtendedDRMTypeSupport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedDRMTypeSupport_Impl, const OFFSET: isize>() -> IMFExtendedDRMTypeSupport_Vtbl {
unsafe extern "system" fn IsTypeSupportedEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFExtendedDRMTypeSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: ::std::mem::MaybeUninit<::windows::core::BSTR>, keysystem: ::std::mem::MaybeUninit<::windows::core::BSTR>, panswer: *mut MF_MEDIA_ENGINE_CANPLAY) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsTypeSupportedEx(::core::mem::transmute(&r#type), ::core::mem::transmute(&keysystem)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(panswer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), IsTypeSupportedEx: IsTypeSupportedEx::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFExtendedDRMTypeSupport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFFieldOfUseMFTUnlock_Impl: Sized {
fn Unlock(&self, punkmft: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFFieldOfUseMFTUnlock {}
impl IMFFieldOfUseMFTUnlock_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFFieldOfUseMFTUnlock_Impl, const OFFSET: isize>() -> IMFFieldOfUseMFTUnlock_Vtbl {
unsafe extern "system" fn Unlock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFFieldOfUseMFTUnlock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punkmft: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Unlock(::windows::core::from_raw_borrowed(&punkmft)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Unlock: Unlock::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFFieldOfUseMFTUnlock as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFFinalizableMediaSink_Impl: Sized + IMFMediaSink_Impl {
fn BeginFinalize(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndFinalize(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFFinalizableMediaSink {}
impl IMFFinalizableMediaSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFFinalizableMediaSink_Impl, const OFFSET: isize>() -> IMFFinalizableMediaSink_Vtbl {
unsafe extern "system" fn BeginFinalize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginFinalize(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndFinalize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFFinalizableMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndFinalize(::windows::core::from_raw_borrowed(&presult)).into()
}
Self {
base__: IMFMediaSink_Vtbl::new::<Identity, Impl, OFFSET>(),
BeginFinalize: BeginFinalize::<Identity, Impl, OFFSET>,
EndFinalize: EndFinalize::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFFinalizableMediaSink as ::windows::core::ComInterface>::IID || iid == &<IMFMediaSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFGetService_Impl: Sized {
fn GetService(&self, guidservice: *const ::windows::core::GUID, riid: *const ::windows::core::GUID, ppvobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFGetService {}
impl IMFGetService_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFGetService_Impl, const OFFSET: isize>() -> IMFGetService_Vtbl {
unsafe extern "system" fn GetService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetService(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFGetService as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFHDCPStatus_Impl: Sized {
fn Query(&self, pstatus: *mut MF_HDCP_STATUS, pfstatus: *mut super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn Set(&self, status: MF_HDCP_STATUS) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFHDCPStatus {}
#[cfg(feature = "Win32_Foundation")]
impl IMFHDCPStatus_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHDCPStatus_Impl, const OFFSET: isize>() -> IMFHDCPStatus_Vtbl {
unsafe extern "system" fn Query<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHDCPStatus_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstatus: *mut MF_HDCP_STATUS, pfstatus: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Query(::core::mem::transmute_copy(&pstatus), ::core::mem::transmute_copy(&pfstatus)).into()
}
unsafe extern "system" fn Set<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHDCPStatus_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, status: MF_HDCP_STATUS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Set(::core::mem::transmute_copy(&status)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Query: Query::<Identity, Impl, OFFSET>, Set: Set::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFHDCPStatus as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFHttpDownloadRequest_Impl: Sized {
fn AddHeader(&self, szheader: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn BeginSendRequest(&self, pbpayload: *const u8, cbpayload: u32, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndSendRequest(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
fn BeginReceiveResponse(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndReceiveResponse(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
fn BeginReadPayload(&self, pb: *mut u8, cb: u32, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndReadPayload(&self, presult: ::core::option::Option<&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<super::super::Foundation::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<super::super::Foundation::BOOL>;
fn GetTotalLength(&self) -> ::windows::core::Result<u64>;
fn GetRangeEndOffset(&self) -> ::windows::core::Result<u64>;
fn Close(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFHttpDownloadRequest {}
#[cfg(feature = "Win32_Foundation")]
impl IMFHttpDownloadRequest_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>() -> IMFHttpDownloadRequest_Vtbl {
unsafe extern "system" fn AddHeader<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, szheader: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddHeader(::core::mem::transmute(&szheader)).into()
}
unsafe extern "system" fn BeginSendRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginSendRequest(::core::mem::transmute_copy(&pbpayload), ::core::mem::transmute_copy(&cbpayload), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndSendRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndSendRequest(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn BeginReceiveResponse<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginReceiveResponse(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndReceiveResponse<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndReceiveResponse(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn BeginReadPayload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginReadPayload(::core::mem::transmute_copy(&pb), ::core::mem::transmute_copy(&cb), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndReadPayload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndReadPayload(::windows::core::from_raw_borrowed(&presult), ::core::mem::transmute_copy(&pqwoffset), ::core::mem::transmute_copy(&pcbread)).into()
}
unsafe extern "system" fn QueryHeader<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.QueryHeader(::core::mem::transmute(&szheadername), ::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppszheadervalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppszurl: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetURL() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppszurl, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn HasNullSourceOrigin<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfnullsourceorigin: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.HasNullSourceOrigin() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfnullsourceorigin, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTimeSeekResult<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTimeSeekResult(::core::mem::transmute_copy(&pqwstarttime), ::core::mem::transmute_copy(&pqwstoptime), ::core::mem::transmute_copy(&pqwduration)).into()
}
unsafe extern "system" fn GetHttpStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwhttpstatus: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetHttpStatus() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwhttpstatus, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetAtEndOfPayload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfatendofpayload: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAtEndOfPayload() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfatendofpayload, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTotalLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwtotallength: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTotalLength() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pqwtotallength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRangeEndOffset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pqwrangeend: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRangeEndOffset() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pqwrangeend, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AddHeader: AddHeader::<Identity, Impl, OFFSET>,
BeginSendRequest: BeginSendRequest::<Identity, Impl, OFFSET>,
EndSendRequest: EndSendRequest::<Identity, Impl, OFFSET>,
BeginReceiveResponse: BeginReceiveResponse::<Identity, Impl, OFFSET>,
EndReceiveResponse: EndReceiveResponse::<Identity, Impl, OFFSET>,
BeginReadPayload: BeginReadPayload::<Identity, Impl, OFFSET>,
EndReadPayload: EndReadPayload::<Identity, Impl, OFFSET>,
QueryHeader: QueryHeader::<Identity, Impl, OFFSET>,
GetURL: GetURL::<Identity, Impl, OFFSET>,
HasNullSourceOrigin: HasNullSourceOrigin::<Identity, Impl, OFFSET>,
GetTimeSeekResult: GetTimeSeekResult::<Identity, Impl, OFFSET>,
GetHttpStatus: GetHttpStatus::<Identity, Impl, OFFSET>,
GetAtEndOfPayload: GetAtEndOfPayload::<Identity, Impl, OFFSET>,
GetTotalLength: GetTotalLength::<Identity, Impl, OFFSET>,
GetRangeEndOffset: GetRangeEndOffset::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFHttpDownloadRequest as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFHttpDownloadSession_Impl: Sized {
fn SetServer(&self, szservername: &::windows::core::PCWSTR, nport: u32) -> ::windows::core::Result<()>;
fn CreateRequest(&self, szobjectname: &::windows::core::PCWSTR, fbypassproxycache: super::super::Foundation::BOOL, fsecure: super::super::Foundation::BOOL, szverb: &::windows::core::PCWSTR, szreferrer: &::windows::core::PCWSTR) -> ::windows::core::Result<IMFHttpDownloadRequest>;
fn Close(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFHttpDownloadSession {}
#[cfg(feature = "Win32_Foundation")]
impl IMFHttpDownloadSession_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadSession_Impl, const OFFSET: isize>() -> IMFHttpDownloadSession_Vtbl {
unsafe extern "system" fn SetServer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, szservername: ::windows::core::PCWSTR, nport: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetServer(::core::mem::transmute(&szservername), ::core::mem::transmute_copy(&nport)).into()
}
unsafe extern "system" fn CreateRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, szobjectname: ::windows::core::PCWSTR, fbypassproxycache: super::super::Foundation::BOOL, fsecure: super::super::Foundation::BOOL, szverb: ::windows::core::PCWSTR, szreferrer: ::windows::core::PCWSTR, pprequest: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateRequest(::core::mem::transmute(&szobjectname), ::core::mem::transmute_copy(&fbypassproxycache), ::core::mem::transmute_copy(&fsecure), ::core::mem::transmute(&szverb), ::core::mem::transmute(&szreferrer)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pprequest, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetServer: SetServer::<Identity, Impl, OFFSET>,
CreateRequest: CreateRequest::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFHttpDownloadSession as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFHttpDownloadSessionProvider_Impl: Sized {
fn CreateHttpDownloadSession(&self, wszscheme: &::windows::core::PCWSTR) -> ::windows::core::Result<IMFHttpDownloadSession>;
}
impl ::windows::core::RuntimeName for IMFHttpDownloadSessionProvider {}
impl IMFHttpDownloadSessionProvider_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFHttpDownloadSessionProvider_Impl, const OFFSET: isize>() -> IMFHttpDownloadSessionProvider_Vtbl {
unsafe extern "system" fn CreateHttpDownloadSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateHttpDownloadSession(::core::mem::transmute(&wszscheme)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdownloadsession, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateHttpDownloadSession: CreateHttpDownloadSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFHttpDownloadSessionProvider as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFImageSharingEngine_Impl: Sized {
fn SetSource(&self, pstream: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> ::windows::core::Result<()>;
fn Shutdown(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFImageSharingEngine {}
impl IMFImageSharingEngine_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFImageSharingEngine_Impl, const OFFSET: isize>() -> IMFImageSharingEngine_Vtbl {
unsafe extern "system" fn SetSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFImageSharingEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstream: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSource(::windows::core::from_raw_borrowed(&pstream)).into()
}
unsafe extern "system" fn GetDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFImageSharingEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdevice: *mut DEVICE_INFO) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDevice(::core::mem::transmute_copy(&pdevice)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFImageSharingEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetSource: SetSource::<Identity, Impl, OFFSET>,
GetDevice: GetDevice::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFImageSharingEngine as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFImageSharingEngineClassFactory_Impl: Sized {
fn CreateInstanceFromUDN(&self, puniquedevicename: &::windows::core::BSTR) -> ::windows::core::Result<IMFImageSharingEngine>;
}
impl ::windows::core::RuntimeName for IMFImageSharingEngineClassFactory {}
impl IMFImageSharingEngineClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFImageSharingEngineClassFactory_Impl, const OFFSET: isize>() -> IMFImageSharingEngineClassFactory_Vtbl {
unsafe extern "system" fn CreateInstanceFromUDN<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFImageSharingEngineClassFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, puniquedevicename: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppengine: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateInstanceFromUDN(::core::mem::transmute(&puniquedevicename)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppengine, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstanceFromUDN: CreateInstanceFromUDN::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFImageSharingEngineClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFInputTrustAuthority_Impl: Sized {
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 ::windows::core::RuntimeName for IMFInputTrustAuthority {}
impl IMFInputTrustAuthority_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFInputTrustAuthority_Impl, const OFFSET: isize>() -> IMFInputTrustAuthority_Vtbl {
unsafe extern "system" fn GetDecrypter<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDecrypter(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
unsafe extern "system" fn RequestAccess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, action: MFPOLICYMANAGER_ACTION, ppcontentenableractivate: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RequestAccess(::core::mem::transmute_copy(&action)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcontentenableractivate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPolicy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, action: MFPOLICYMANAGER_ACTION, pppolicy: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPolicy(::core::mem::transmute_copy(&action)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pppolicy, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BindAccess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BindAccess(::core::mem::transmute_copy(&pparam)).into()
}
unsafe extern "system" fn UpdateAccess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateAccess(::core::mem::transmute_copy(&pparam)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDecrypter: GetDecrypter::<Identity, Impl, OFFSET>,
RequestAccess: RequestAccess::<Identity, Impl, OFFSET>,
GetPolicy: GetPolicy::<Identity, Impl, OFFSET>,
BindAccess: BindAccess::<Identity, Impl, OFFSET>,
UpdateAccess: UpdateAccess::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFInputTrustAuthority as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFLocalMFTRegistration_Impl: Sized {
fn RegisterMFTs(&self, pmfts: *const MFT_REGISTRATION_INFO, cmfts: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFLocalMFTRegistration {}
impl IMFLocalMFTRegistration_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFLocalMFTRegistration_Impl, const OFFSET: isize>() -> IMFLocalMFTRegistration_Vtbl {
unsafe extern "system" fn RegisterMFTs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFLocalMFTRegistration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmfts: *const MFT_REGISTRATION_INFO, cmfts: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterMFTs(::core::mem::transmute_copy(&pmfts), ::core::mem::transmute_copy(&cmfts)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), RegisterMFTs: RegisterMFTs::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFLocalMFTRegistration as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaBuffer_Impl: Sized {
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 ::windows::core::RuntimeName for IMFMediaBuffer {}
impl IMFMediaBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaBuffer_Impl, const OFFSET: isize>() -> IMFMediaBuffer_Vtbl {
unsafe extern "system" fn Lock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppbbuffer: *mut *mut u8, pcbmaxlength: *mut u32, pcbcurrentlength: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Lock(::core::mem::transmute_copy(&ppbbuffer), ::core::mem::transmute_copy(&pcbmaxlength), ::core::mem::transmute_copy(&pcbcurrentlength)).into()
}
unsafe extern "system" fn Unlock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Unlock().into()
}
unsafe extern "system" fn GetCurrentLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcbcurrentlength: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentLength() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbcurrentlength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetCurrentLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, cbcurrentlength: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentLength(::core::mem::transmute_copy(&cbcurrentlength)).into()
}
unsafe extern "system" fn GetMaxLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcbmaxlength: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMaxLength() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbmaxlength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Lock: Lock::<Identity, Impl, OFFSET>,
Unlock: Unlock::<Identity, Impl, OFFSET>,
GetCurrentLength: GetCurrentLength::<Identity, Impl, OFFSET>,
SetCurrentLength: SetCurrentLength::<Identity, Impl, OFFSET>,
GetMaxLength: GetMaxLength::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngine_Impl: Sized {
fn GetError(&self) -> ::windows::core::Result<IMFMediaError>;
fn SetErrorCode(&self, error: MF_MEDIA_ENGINE_ERR) -> ::windows::core::Result<()>;
fn SetSourceElements(&self, psrcelements: ::core::option::Option<&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) -> super::super::Foundation::BOOL;
fn GetCurrentTime(&self) -> f64;
fn SetCurrentTime(&self, seektime: f64) -> ::windows::core::Result<()>;
fn GetStartTime(&self) -> f64;
fn GetDuration(&self) -> f64;
fn IsPaused(&self) -> super::super::Foundation::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) -> super::super::Foundation::BOOL;
fn GetAutoPlay(&self) -> super::super::Foundation::BOOL;
fn SetAutoPlay(&self, autoplay: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetLoop(&self) -> super::super::Foundation::BOOL;
fn SetLoop(&self, r#loop: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn Play(&self) -> ::windows::core::Result<()>;
fn Pause(&self) -> ::windows::core::Result<()>;
fn GetMuted(&self) -> super::super::Foundation::BOOL;
fn SetMuted(&self, muted: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetVolume(&self) -> f64;
fn SetVolume(&self, volume: f64) -> ::windows::core::Result<()>;
fn HasVideo(&self) -> super::super::Foundation::BOOL;
fn HasAudio(&self) -> super::super::Foundation::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: ::core::option::Option<&::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>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngine {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngine_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>() -> IMFMediaEngine_Vtbl {
unsafe extern "system" fn GetError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pperror: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetError() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pperror, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, error: MF_MEDIA_ENGINE_ERR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetErrorCode(::core::mem::transmute_copy(&error)).into()
}
unsafe extern "system" fn SetSourceElements<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psrcelements: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSourceElements(::windows::core::from_raw_borrowed(&psrcelements)).into()
}
unsafe extern "system" fn SetSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, purl: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSource(::core::mem::transmute(&purl)).into()
}
unsafe extern "system" fn GetCurrentSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppurl: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppurl, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetNetworkState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u16 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNetworkState()
}
unsafe extern "system" fn GetPreload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_MEDIA_ENGINE_PRELOAD {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPreload()
}
unsafe extern "system" fn SetPreload<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, preload: MF_MEDIA_ENGINE_PRELOAD) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPreload(::core::mem::transmute_copy(&preload)).into()
}
unsafe extern "system" fn GetBuffered<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppbuffered: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBuffered() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppbuffered, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Load<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Load().into()
}
unsafe extern "system" fn CanPlayType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: ::std::mem::MaybeUninit<::windows::core::BSTR>, panswer: *mut MF_MEDIA_ENGINE_CANPLAY) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CanPlayType(::core::mem::transmute(&r#type)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(panswer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetReadyState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u16 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetReadyState()
}
unsafe extern "system" fn IsSeeking<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSeeking()
}
unsafe extern "system" fn GetCurrentTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCurrentTime()
}
unsafe extern "system" fn SetCurrentTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, seektime: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentTime(::core::mem::transmute_copy(&seektime)).into()
}
unsafe extern "system" fn GetStartTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStartTime()
}
unsafe extern "system" fn GetDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDuration()
}
unsafe extern "system" fn IsPaused<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsPaused()
}
unsafe extern "system" fn GetDefaultPlaybackRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDefaultPlaybackRate()
}
unsafe extern "system" fn SetDefaultPlaybackRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rate: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultPlaybackRate(::core::mem::transmute_copy(&rate)).into()
}
unsafe extern "system" fn GetPlaybackRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPlaybackRate()
}
unsafe extern "system" fn SetPlaybackRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rate: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPlaybackRate(::core::mem::transmute_copy(&rate)).into()
}
unsafe extern "system" fn GetPlayed<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppplayed: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPlayed() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppplayed, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSeekable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppseekable: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSeekable() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppseekable, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsEnded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsEnded()
}
unsafe extern "system" fn GetAutoPlay<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAutoPlay()
}
unsafe extern "system" fn SetAutoPlay<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, autoplay: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAutoPlay(::core::mem::transmute_copy(&autoplay)).into()
}
unsafe extern "system" fn GetLoop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLoop()
}
unsafe extern "system" fn SetLoop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#loop: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLoop(::core::mem::transmute_copy(&r#loop)).into()
}
unsafe extern "system" fn Play<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Play().into()
}
unsafe extern "system" fn Pause<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Pause().into()
}
unsafe extern "system" fn GetMuted<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetMuted()
}
unsafe extern "system" fn SetMuted<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, muted: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMuted(::core::mem::transmute_copy(&muted)).into()
}
unsafe extern "system" fn GetVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVolume()
}
unsafe extern "system" fn SetVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, volume: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVolume(::core::mem::transmute_copy(&volume)).into()
}
unsafe extern "system" fn HasVideo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasVideo()
}
unsafe extern "system" fn HasAudio<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasAudio()
}
unsafe extern "system" fn GetNativeVideoSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, cx: *mut u32, cy: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNativeVideoSize(::core::mem::transmute_copy(&cx), ::core::mem::transmute_copy(&cy)).into()
}
unsafe extern "system" fn GetVideoAspectRatio<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, cx: *mut u32, cy: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoAspectRatio(::core::mem::transmute_copy(&cx), ::core::mem::transmute_copy(&cy)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
unsafe extern "system" fn TransferVideoFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TransferVideoFrame(::windows::core::from_raw_borrowed(&pdstsurf), ::core::mem::transmute_copy(&psrc), ::core::mem::transmute_copy(&pdst), ::core::mem::transmute_copy(&pborderclr)).into()
}
unsafe extern "system" fn OnVideoStreamTick<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppts: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.OnVideoStreamTick() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppts, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetError: GetError::<Identity, Impl, OFFSET>,
SetErrorCode: SetErrorCode::<Identity, Impl, OFFSET>,
SetSourceElements: SetSourceElements::<Identity, Impl, OFFSET>,
SetSource: SetSource::<Identity, Impl, OFFSET>,
GetCurrentSource: GetCurrentSource::<Identity, Impl, OFFSET>,
GetNetworkState: GetNetworkState::<Identity, Impl, OFFSET>,
GetPreload: GetPreload::<Identity, Impl, OFFSET>,
SetPreload: SetPreload::<Identity, Impl, OFFSET>,
GetBuffered: GetBuffered::<Identity, Impl, OFFSET>,
Load: Load::<Identity, Impl, OFFSET>,
CanPlayType: CanPlayType::<Identity, Impl, OFFSET>,
GetReadyState: GetReadyState::<Identity, Impl, OFFSET>,
IsSeeking: IsSeeking::<Identity, Impl, OFFSET>,
GetCurrentTime: GetCurrentTime::<Identity, Impl, OFFSET>,
SetCurrentTime: SetCurrentTime::<Identity, Impl, OFFSET>,
GetStartTime: GetStartTime::<Identity, Impl, OFFSET>,
GetDuration: GetDuration::<Identity, Impl, OFFSET>,
IsPaused: IsPaused::<Identity, Impl, OFFSET>,
GetDefaultPlaybackRate: GetDefaultPlaybackRate::<Identity, Impl, OFFSET>,
SetDefaultPlaybackRate: SetDefaultPlaybackRate::<Identity, Impl, OFFSET>,
GetPlaybackRate: GetPlaybackRate::<Identity, Impl, OFFSET>,
SetPlaybackRate: SetPlaybackRate::<Identity, Impl, OFFSET>,
GetPlayed: GetPlayed::<Identity, Impl, OFFSET>,
GetSeekable: GetSeekable::<Identity, Impl, OFFSET>,
IsEnded: IsEnded::<Identity, Impl, OFFSET>,
GetAutoPlay: GetAutoPlay::<Identity, Impl, OFFSET>,
SetAutoPlay: SetAutoPlay::<Identity, Impl, OFFSET>,
GetLoop: GetLoop::<Identity, Impl, OFFSET>,
SetLoop: SetLoop::<Identity, Impl, OFFSET>,
Play: Play::<Identity, Impl, OFFSET>,
Pause: Pause::<Identity, Impl, OFFSET>,
GetMuted: GetMuted::<Identity, Impl, OFFSET>,
SetMuted: SetMuted::<Identity, Impl, OFFSET>,
GetVolume: GetVolume::<Identity, Impl, OFFSET>,
SetVolume: SetVolume::<Identity, Impl, OFFSET>,
HasVideo: HasVideo::<Identity, Impl, OFFSET>,
HasAudio: HasAudio::<Identity, Impl, OFFSET>,
GetNativeVideoSize: GetNativeVideoSize::<Identity, Impl, OFFSET>,
GetVideoAspectRatio: GetVideoAspectRatio::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
TransferVideoFrame: TransferVideoFrame::<Identity, Impl, OFFSET>,
OnVideoStreamTick: OnVideoStreamTick::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngine as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineAudioEndpointId_Impl: Sized {
fn SetAudioEndpointId(&self, pszendpointid: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn GetAudioEndpointId(&self) -> ::windows::core::Result<::windows::core::PWSTR>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineAudioEndpointId {}
impl IMFMediaEngineAudioEndpointId_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineAudioEndpointId_Impl, const OFFSET: isize>() -> IMFMediaEngineAudioEndpointId_Vtbl {
unsafe extern "system" fn SetAudioEndpointId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineAudioEndpointId_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszendpointid: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAudioEndpointId(::core::mem::transmute(&pszendpointid)).into()
}
unsafe extern "system" fn GetAudioEndpointId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineAudioEndpointId_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppszendpointid: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAudioEndpointId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppszendpointid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetAudioEndpointId: SetAudioEndpointId::<Identity, Impl, OFFSET>,
GetAudioEndpointId: GetAudioEndpointId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineAudioEndpointId as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineClassFactory_Impl: Sized {
fn CreateInstance(&self, dwflags: u32, pattr: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<IMFMediaEngine>;
fn CreateTimeRange(&self) -> ::windows::core::Result<IMFMediaTimeRange>;
fn CreateError(&self) -> ::windows::core::Result<IMFMediaError>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineClassFactory {}
impl IMFMediaEngineClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>() -> IMFMediaEngineClassFactory_Vtbl {
unsafe extern "system" fn CreateInstance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateInstance(::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pattr)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppplayer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateTimeRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pptimerange: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateTimeRange() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptimerange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pperror: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateError() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pperror, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateInstance: CreateInstance::<Identity, Impl, OFFSET>,
CreateTimeRange: CreateTimeRange::<Identity, Impl, OFFSET>,
CreateError: CreateError::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineClassFactory2_Impl: Sized {
fn CreateMediaKeys2(&self, keysystem: &::windows::core::BSTR, defaultcdmstorepath: &::windows::core::BSTR, inprivatecdmstorepath: &::windows::core::BSTR) -> ::windows::core::Result<IMFMediaKeys>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineClassFactory2 {}
impl IMFMediaEngineClassFactory2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory2_Impl, const OFFSET: isize>() -> IMFMediaEngineClassFactory2_Vtbl {
unsafe extern "system" fn CreateMediaKeys2<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: ::std::mem::MaybeUninit<::windows::core::BSTR>, defaultcdmstorepath: ::std::mem::MaybeUninit<::windows::core::BSTR>, inprivatecdmstorepath: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppkeys: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMediaKeys2(::core::mem::transmute(&keysystem), ::core::mem::transmute(&defaultcdmstorepath), ::core::mem::transmute(&inprivatecdmstorepath)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppkeys, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateMediaKeys2: CreateMediaKeys2::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFMediaEngineClassFactory3_Impl: Sized {
fn CreateMediaKeySystemAccess(&self, keysystem: &::windows::core::BSTR, ppsupportedconfigurationsarray: *const ::core::option::Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, usize: u32) -> ::windows::core::Result<IMFMediaKeySystemAccess>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::windows::core::RuntimeName for IMFMediaEngineClassFactory3 {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFMediaEngineClassFactory3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory3_Impl, const OFFSET: isize>() -> IMFMediaEngineClassFactory3_Vtbl {
unsafe extern "system" fn CreateMediaKeySystemAccess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppsupportedconfigurationsarray: *const *mut ::core::ffi::c_void, usize: u32, ppkeyaccess: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMediaKeySystemAccess(::core::mem::transmute(&keysystem), ::core::mem::transmute_copy(&ppsupportedconfigurationsarray), ::core::mem::transmute_copy(&usize)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppkeyaccess, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateMediaKeySystemAccess: CreateMediaKeySystemAccess::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory3 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineClassFactory4_Impl: Sized {
fn CreateContentDecryptionModuleFactory(&self, keysystem: &::windows::core::PCWSTR, riid: *const ::windows::core::GUID, ppvobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineClassFactory4 {}
impl IMFMediaEngineClassFactory4_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactory4_Impl, const OFFSET: isize>() -> IMFMediaEngineClassFactory4_Vtbl {
unsafe extern "system" fn CreateContentDecryptionModuleFactory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateContentDecryptionModuleFactory(::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, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory4 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngineClassFactoryEx_Impl: Sized + IMFMediaEngineClassFactory_Impl {
fn CreateMediaSourceExtension(&self, dwflags: u32, pattr: ::core::option::Option<&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<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngineClassFactoryEx {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngineClassFactoryEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>() -> IMFMediaEngineClassFactoryEx_Vtbl {
unsafe extern "system" fn CreateMediaSourceExtension<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMediaSourceExtension(::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pattr)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmse, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateMediaKeys<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: ::std::mem::MaybeUninit<::windows::core::BSTR>, cdmstorepath: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppkeys: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMediaKeys(::core::mem::transmute(&keysystem), ::core::mem::transmute(&cdmstorepath)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppkeys, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsTypeSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: ::std::mem::MaybeUninit<::windows::core::BSTR>, keysystem: ::std::mem::MaybeUninit<::windows::core::BSTR>, issupported: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsTypeSupported(::core::mem::transmute(&r#type), ::core::mem::transmute(&keysystem)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(issupported, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFMediaEngineClassFactory_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateMediaSourceExtension: CreateMediaSourceExtension::<Identity, Impl, OFFSET>,
CreateMediaKeys: CreateMediaKeys::<Identity, Impl, OFFSET>,
IsTypeSupported: IsTypeSupported::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactoryEx as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEngineClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineEME_Impl: Sized {
fn Keys(&self) -> ::windows::core::Result<IMFMediaKeys>;
fn SetMediaKeys(&self, keys: ::core::option::Option<&IMFMediaKeys>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineEME {}
impl IMFMediaEngineEME_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEME_Impl, const OFFSET: isize>() -> IMFMediaEngineEME_Vtbl {
unsafe extern "system" fn Keys<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEME_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keys: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Keys() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(keys, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetMediaKeys<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEME_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keys: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMediaKeys(::windows::core::from_raw_borrowed(&keys)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Keys: Keys::<Identity, Impl, OFFSET>,
SetMediaKeys: SetMediaKeys::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineEME as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineEMENotify_Impl: Sized {
fn Encrypted(&self, pbinitdata: *const u8, cb: u32, bstrinitdatatype: &::windows::core::BSTR);
fn WaitingForKey(&self);
}
impl ::windows::core::RuntimeName for IMFMediaEngineEMENotify {}
impl IMFMediaEngineEMENotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEMENotify_Impl, const OFFSET: isize>() -> IMFMediaEngineEMENotify_Vtbl {
unsafe extern "system" fn Encrypted<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEMENotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbinitdata: *const u8, cb: u32, bstrinitdatatype: ::std::mem::MaybeUninit<::windows::core::BSTR>) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Encrypted(::core::mem::transmute_copy(&pbinitdata), ::core::mem::transmute_copy(&cb), ::core::mem::transmute(&bstrinitdatatype))
}
unsafe extern "system" fn WaitingForKey<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEMENotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WaitingForKey()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Encrypted: Encrypted::<Identity, Impl, OFFSET>,
WaitingForKey: WaitingForKey::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineEMENotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaEngineEx_Impl: Sized + IMFMediaEngine_Impl {
fn SetSourceFromByteStream(&self, pbytestream: ::core::option::Option<&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) -> super::super::Foundation::BOOL;
fn FrameStep(&self, forward: super::super::Foundation::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<super::super::Foundation::BOOL>;
fn SetStreamSelection(&self, dwstreamindex: u32, enabled: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn ApplyStreamSelections(&self) -> ::windows::core::Result<()>;
fn IsProtected(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn InsertVideoEffect(&self, peffect: ::core::option::Option<&::windows::core::IUnknown>, foptional: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn InsertAudioEffect(&self, peffect: ::core::option::Option<&::windows::core::IUnknown>, foptional: super::super::Foundation::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) -> super::super::Foundation::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: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetVideoSwapchainHandle(&self) -> ::windows::core::Result<super::super::Foundation::HANDLE>;
fn EnableHorizontalMirrorMode(&self, fenable: super::super::Foundation::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<super::super::Foundation::BOOL>;
fn SetRealTimeMode(&self, fenable: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn SetCurrentTimeEx(&self, seektime: f64, seekmode: MF_MEDIA_ENGINE_SEEK_MODE) -> ::windows::core::Result<()>;
fn EnableTimeUpdateTimer(&self, fenabletimer: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaEngineEx {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaEngineEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>() -> IMFMediaEngineEx_Vtbl {
unsafe extern "system" fn SetSourceFromByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbytestream: *mut ::core::ffi::c_void, purl: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSourceFromByteStream(::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute(&purl)).into()
}
unsafe extern "system" fn GetStatistics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStatistics(::core::mem::transmute_copy(&statisticid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pstatistic, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn UpdateVideoStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateVideoStream(::core::mem::transmute_copy(&psrc), ::core::mem::transmute_copy(&pdst), ::core::mem::transmute_copy(&pborderclr)).into()
}
unsafe extern "system" fn GetBalance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetBalance()
}
unsafe extern "system" fn SetBalance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, balance: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBalance(::core::mem::transmute_copy(&balance)).into()
}
unsafe extern "system" fn IsPlaybackRateSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rate: f64) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsPlaybackRateSupported(::core::mem::transmute_copy(&rate))
}
unsafe extern "system" fn FrameStep<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, forward: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FrameStep(::core::mem::transmute_copy(&forward)).into()
}
unsafe extern "system" fn GetResourceCharacteristics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcharacteristics: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetResourceCharacteristics() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcharacteristics, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPresentationAttribute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPresentationAttribute(::core::mem::transmute_copy(&guidmfattribute)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetNumberOfStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNumberOfStreams() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamAttribute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamAttribute(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&guidmfattribute)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, penabled: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamSelection(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(penabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStreamSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, enabled: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamSelection(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn ApplyStreamSelections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ApplyStreamSelections().into()
}
unsafe extern "system" fn IsProtected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprotected: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsProtected() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pprotected, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InsertVideoEffect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, peffect: *mut ::core::ffi::c_void, foptional: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InsertVideoEffect(::windows::core::from_raw_borrowed(&peffect), ::core::mem::transmute_copy(&foptional)).into()
}
unsafe extern "system" fn InsertAudioEffect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, peffect: *mut ::core::ffi::c_void, foptional: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InsertAudioEffect(::windows::core::from_raw_borrowed(&peffect), ::core::mem::transmute_copy(&foptional)).into()
}
unsafe extern "system" fn RemoveAllEffects<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllEffects().into()
}
unsafe extern "system" fn SetTimelineMarkerTimer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, timetofire: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTimelineMarkerTimer(::core::mem::transmute_copy(&timetofire)).into()
}
unsafe extern "system" fn GetTimelineMarkerTimer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptimetofire: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTimelineMarkerTimer() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptimetofire, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CancelTimelineMarkerTimer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelTimelineMarkerTimer().into()
}
unsafe extern "system" fn IsStereo3D<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsStereo3D()
}
unsafe extern "system" fn GetStereo3DFramePackingMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, packmode: *mut MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStereo3DFramePackingMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(packmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStereo3DFramePackingMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, packmode: MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStereo3DFramePackingMode(::core::mem::transmute_copy(&packmode)).into()
}
unsafe extern "system" fn GetStereo3DRenderMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, outputtype: *mut MF3DVideoOutputType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStereo3DRenderMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(outputtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStereo3DRenderMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, outputtype: MF3DVideoOutputType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStereo3DRenderMode(::core::mem::transmute_copy(&outputtype)).into()
}
unsafe extern "system" fn EnableWindowlessSwapchainMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenable: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableWindowlessSwapchainMode(::core::mem::transmute_copy(&fenable)).into()
}
unsafe extern "system" fn GetVideoSwapchainHandle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phswapchain: *mut super::super::Foundation::HANDLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoSwapchainHandle() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phswapchain, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn EnableHorizontalMirrorMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenable: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableHorizontalMirrorMode(::core::mem::transmute_copy(&fenable)).into()
}
unsafe extern "system" fn GetAudioStreamCategory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcategory: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAudioStreamCategory() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcategory, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAudioStreamCategory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, category: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAudioStreamCategory(::core::mem::transmute_copy(&category)).into()
}
unsafe extern "system" fn GetAudioEndpointRole<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, prole: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAudioEndpointRole() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(prole, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAudioEndpointRole<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, role: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAudioEndpointRole(::core::mem::transmute_copy(&role)).into()
}
unsafe extern "system" fn GetRealTimeMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfenabled: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRealTimeMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfenabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRealTimeMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenable: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRealTimeMode(::core::mem::transmute_copy(&fenable)).into()
}
unsafe extern "system" fn SetCurrentTimeEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, seektime: f64, seekmode: MF_MEDIA_ENGINE_SEEK_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentTimeEx(::core::mem::transmute_copy(&seektime), ::core::mem::transmute_copy(&seekmode)).into()
}
unsafe extern "system" fn EnableTimeUpdateTimer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenabletimer: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableTimeUpdateTimer(::core::mem::transmute_copy(&fenabletimer)).into()
}
Self {
base__: IMFMediaEngine_Vtbl::new::<Identity, Impl, OFFSET>(),
SetSourceFromByteStream: SetSourceFromByteStream::<Identity, Impl, OFFSET>,
GetStatistics: GetStatistics::<Identity, Impl, OFFSET>,
UpdateVideoStream: UpdateVideoStream::<Identity, Impl, OFFSET>,
GetBalance: GetBalance::<Identity, Impl, OFFSET>,
SetBalance: SetBalance::<Identity, Impl, OFFSET>,
IsPlaybackRateSupported: IsPlaybackRateSupported::<Identity, Impl, OFFSET>,
FrameStep: FrameStep::<Identity, Impl, OFFSET>,
GetResourceCharacteristics: GetResourceCharacteristics::<Identity, Impl, OFFSET>,
GetPresentationAttribute: GetPresentationAttribute::<Identity, Impl, OFFSET>,
GetNumberOfStreams: GetNumberOfStreams::<Identity, Impl, OFFSET>,
GetStreamAttribute: GetStreamAttribute::<Identity, Impl, OFFSET>,
GetStreamSelection: GetStreamSelection::<Identity, Impl, OFFSET>,
SetStreamSelection: SetStreamSelection::<Identity, Impl, OFFSET>,
ApplyStreamSelections: ApplyStreamSelections::<Identity, Impl, OFFSET>,
IsProtected: IsProtected::<Identity, Impl, OFFSET>,
InsertVideoEffect: InsertVideoEffect::<Identity, Impl, OFFSET>,
InsertAudioEffect: InsertAudioEffect::<Identity, Impl, OFFSET>,
RemoveAllEffects: RemoveAllEffects::<Identity, Impl, OFFSET>,
SetTimelineMarkerTimer: SetTimelineMarkerTimer::<Identity, Impl, OFFSET>,
GetTimelineMarkerTimer: GetTimelineMarkerTimer::<Identity, Impl, OFFSET>,
CancelTimelineMarkerTimer: CancelTimelineMarkerTimer::<Identity, Impl, OFFSET>,
IsStereo3D: IsStereo3D::<Identity, Impl, OFFSET>,
GetStereo3DFramePackingMode: GetStereo3DFramePackingMode::<Identity, Impl, OFFSET>,
SetStereo3DFramePackingMode: SetStereo3DFramePackingMode::<Identity, Impl, OFFSET>,
GetStereo3DRenderMode: GetStereo3DRenderMode::<Identity, Impl, OFFSET>,
SetStereo3DRenderMode: SetStereo3DRenderMode::<Identity, Impl, OFFSET>,
EnableWindowlessSwapchainMode: EnableWindowlessSwapchainMode::<Identity, Impl, OFFSET>,
GetVideoSwapchainHandle: GetVideoSwapchainHandle::<Identity, Impl, OFFSET>,
EnableHorizontalMirrorMode: EnableHorizontalMirrorMode::<Identity, Impl, OFFSET>,
GetAudioStreamCategory: GetAudioStreamCategory::<Identity, Impl, OFFSET>,
SetAudioStreamCategory: SetAudioStreamCategory::<Identity, Impl, OFFSET>,
GetAudioEndpointRole: GetAudioEndpointRole::<Identity, Impl, OFFSET>,
SetAudioEndpointRole: SetAudioEndpointRole::<Identity, Impl, OFFSET>,
GetRealTimeMode: GetRealTimeMode::<Identity, Impl, OFFSET>,
SetRealTimeMode: SetRealTimeMode::<Identity, Impl, OFFSET>,
SetCurrentTimeEx: SetCurrentTimeEx::<Identity, Impl, OFFSET>,
EnableTimeUpdateTimer: EnableTimeUpdateTimer::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineEx as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEngine as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngineExtension_Impl: Sized {
fn CanPlayType(&self, audioonly: super::super::Foundation::BOOL, mimetype: &::windows::core::BSTR) -> ::windows::core::Result<MF_MEDIA_ENGINE_CANPLAY>;
fn BeginCreateObject(&self, bstrurl: &::windows::core::BSTR, pbytestream: ::core::option::Option<&IMFByteStream>, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: *mut ::core::option::Option<::windows::core::IUnknown>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndCreateObject(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<::windows::core::IUnknown>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngineExtension {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngineExtension_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineExtension_Impl, const OFFSET: isize>() -> IMFMediaEngineExtension_Vtbl {
unsafe extern "system" fn CanPlayType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, audioonly: super::super::Foundation::BOOL, mimetype: ::std::mem::MaybeUninit<::windows::core::BSTR>, panswer: *mut MF_MEDIA_ENGINE_CANPLAY) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CanPlayType(::core::mem::transmute_copy(&audioonly), ::core::mem::transmute(&mimetype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(panswer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginCreateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrurl: ::std::mem::MaybeUninit<::windows::core::BSTR>, 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginCreateObject(::core::mem::transmute(&bstrurl), ::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&ppiunknowncancelcookie), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn CancelObjectCreation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piunknowncancelcookie: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelObjectCreation(::windows::core::from_raw_borrowed(&piunknowncancelcookie)).into()
}
unsafe extern "system" fn EndCreateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndCreateObject(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppobject, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CanPlayType: CanPlayType::<Identity, Impl, OFFSET>,
BeginCreateObject: BeginCreateObject::<Identity, Impl, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, Impl, OFFSET>,
EndCreateObject: EndCreateObject::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineExtension as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineNeedKeyNotify_Impl: Sized {
fn NeedKey(&self, initdata: *const u8, cb: u32);
}
impl ::windows::core::RuntimeName for IMFMediaEngineNeedKeyNotify {}
impl IMFMediaEngineNeedKeyNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineNeedKeyNotify_Impl, const OFFSET: isize>() -> IMFMediaEngineNeedKeyNotify_Vtbl {
unsafe extern "system" fn NeedKey<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineNeedKeyNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, initdata: *const u8, cb: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NeedKey(::core::mem::transmute_copy(&initdata), ::core::mem::transmute_copy(&cb))
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NeedKey: NeedKey::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineNeedKeyNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineNotify_Impl: Sized {
fn EventNotify(&self, event: u32, param1: usize, param2: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineNotify {}
impl IMFMediaEngineNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineNotify_Impl, const OFFSET: isize>() -> IMFMediaEngineNotify_Vtbl {
unsafe extern "system" fn EventNotify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, event: u32, param1: usize, param2: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EventNotify(::core::mem::transmute_copy(&event), ::core::mem::transmute_copy(&param1), ::core::mem::transmute_copy(&param2)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), EventNotify: EventNotify::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngineOPMInfo_Impl: Sized {
fn GetOPMInfo(&self, pstatus: *mut MF_MEDIA_ENGINE_OPM_STATUS, pconstricted: *mut super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngineOPMInfo {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngineOPMInfo_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineOPMInfo_Impl, const OFFSET: isize>() -> IMFMediaEngineOPMInfo_Vtbl {
unsafe extern "system" fn GetOPMInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineOPMInfo_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstatus: *mut MF_MEDIA_ENGINE_OPM_STATUS, pconstricted: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetOPMInfo(::core::mem::transmute_copy(&pstatus), ::core::mem::transmute_copy(&pconstricted)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetOPMInfo: GetOPMInfo::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineOPMInfo as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngineProtectedContent_Impl: Sized {
fn ShareResources(&self, punkdevicecontext: ::core::option::Option<&::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: ::core::option::Option<&::windows::core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> ::windows::core::Result<u32>;
fn SetContentProtectionManager(&self, pcpm: ::core::option::Option<&IMFContentProtectionManager>) -> ::windows::core::Result<()>;
fn SetApplicationCertificate(&self, pbblob: *const u8, cbblob: u32) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngineProtectedContent {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngineProtectedContent_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>() -> IMFMediaEngineProtectedContent_Vtbl {
unsafe extern "system" fn ShareResources<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punkdevicecontext: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShareResources(::windows::core::from_raw_borrowed(&punkdevicecontext)).into()
}
unsafe extern "system" fn GetRequiredProtections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pframeprotectionflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRequiredProtections() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pframeprotectionflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetOPMWindow<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOPMWindow(::core::mem::transmute_copy(&hwnd)).into()
}
unsafe extern "system" fn TransferVideoFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.TransferVideoFrame(::windows::core::from_raw_borrowed(&pdstsurf), ::core::mem::transmute_copy(&psrc), ::core::mem::transmute_copy(&pdst), ::core::mem::transmute_copy(&pborderclr)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pframeprotectionflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetContentProtectionManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcpm: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetContentProtectionManager(::windows::core::from_raw_borrowed(&pcpm)).into()
}
unsafe extern "system" fn SetApplicationCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbblob: *const u8, cbblob: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetApplicationCertificate(::core::mem::transmute_copy(&pbblob), ::core::mem::transmute_copy(&cbblob)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ShareResources: ShareResources::<Identity, Impl, OFFSET>,
GetRequiredProtections: GetRequiredProtections::<Identity, Impl, OFFSET>,
SetOPMWindow: SetOPMWindow::<Identity, Impl, OFFSET>,
TransferVideoFrame: TransferVideoFrame::<Identity, Impl, OFFSET>,
SetContentProtectionManager: SetContentProtectionManager::<Identity, Impl, OFFSET>,
SetApplicationCertificate: SetApplicationCertificate::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineProtectedContent as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineSrcElements_Impl: Sized {
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 ::windows::core::RuntimeName for IMFMediaEngineSrcElements {}
impl IMFMediaEngineSrcElements_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>() -> IMFMediaEngineSrcElements_Vtbl {
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLength()
}
unsafe extern "system" fn GetURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, purl: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetURL(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(purl, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, ptype: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetType(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMedia<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, pmedia: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMedia(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmedia, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddElement<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, purl: ::std::mem::MaybeUninit<::windows::core::BSTR>, ptype: ::std::mem::MaybeUninit<::windows::core::BSTR>, pmedia: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddElement(::core::mem::transmute(&purl), ::core::mem::transmute(&ptype), ::core::mem::transmute(&pmedia)).into()
}
unsafe extern "system" fn RemoveAllElements<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllElements().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, Impl, OFFSET>,
GetURL: GetURL::<Identity, Impl, OFFSET>,
GetType: GetType::<Identity, Impl, OFFSET>,
GetMedia: GetMedia::<Identity, Impl, OFFSET>,
AddElement: AddElement::<Identity, Impl, OFFSET>,
RemoveAllElements: RemoveAllElements::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineSrcElements as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineSrcElementsEx_Impl: Sized + 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 ::windows::core::RuntimeName for IMFMediaEngineSrcElementsEx {}
impl IMFMediaEngineSrcElementsEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElementsEx_Impl, const OFFSET: isize>() -> IMFMediaEngineSrcElementsEx_Vtbl {
unsafe extern "system" fn AddElementEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElementsEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, purl: ::std::mem::MaybeUninit<::windows::core::BSTR>, ptype: ::std::mem::MaybeUninit<::windows::core::BSTR>, pmedia: ::std::mem::MaybeUninit<::windows::core::BSTR>, keysystem: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddElementEx(::core::mem::transmute(&purl), ::core::mem::transmute(&ptype), ::core::mem::transmute(&pmedia), ::core::mem::transmute(&keysystem)).into()
}
unsafe extern "system" fn GetKeySystem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSrcElementsEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, ptype: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetKeySystem(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFMediaEngineSrcElements_Vtbl::new::<Identity, Impl, OFFSET>(),
AddElementEx: AddElementEx::<Identity, Impl, OFFSET>,
GetKeySystem: GetKeySystem::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineSrcElementsEx as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEngineSrcElements as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngineSupportsSourceTransfer_Impl: Sized {
fn ShouldTransferSource(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn DetachMediaSource(&self, ppbytestream: *mut ::core::option::Option<IMFByteStream>, ppmediasource: *mut ::core::option::Option<IMFMediaSource>, ppmse: *mut ::core::option::Option<IMFMediaSourceExtension>) -> ::windows::core::Result<()>;
fn AttachMediaSource(&self, pbytestream: ::core::option::Option<&IMFByteStream>, pmediasource: ::core::option::Option<&IMFMediaSource>, pmse: ::core::option::Option<&IMFMediaSourceExtension>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngineSupportsSourceTransfer {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngineSupportsSourceTransfer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSupportsSourceTransfer_Impl, const OFFSET: isize>() -> IMFMediaEngineSupportsSourceTransfer_Vtbl {
unsafe extern "system" fn ShouldTransferSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineSupportsSourceTransfer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfshouldtransfer: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ShouldTransferSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfshouldtransfer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DetachMediaSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DetachMediaSource(::core::mem::transmute_copy(&ppbytestream), ::core::mem::transmute_copy(&ppmediasource), ::core::mem::transmute_copy(&ppmse)).into()
}
unsafe extern "system" fn AttachMediaSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AttachMediaSource(::windows::core::from_raw_borrowed(&pbytestream), ::windows::core::from_raw_borrowed(&pmediasource), ::windows::core::from_raw_borrowed(&pmse)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ShouldTransferSource: ShouldTransferSource::<Identity, Impl, OFFSET>,
DetachMediaSource: DetachMediaSource::<Identity, Impl, OFFSET>,
AttachMediaSource: AttachMediaSource::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineSupportsSourceTransfer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaEngineTransferSource_Impl: Sized {
fn TransferSourceToMediaEngine(&self, destination: ::core::option::Option<&IMFMediaEngine>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaEngineTransferSource {}
impl IMFMediaEngineTransferSource_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineTransferSource_Impl, const OFFSET: isize>() -> IMFMediaEngineTransferSource_Vtbl {
unsafe extern "system" fn TransferSourceToMediaEngine<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineTransferSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, destination: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TransferSourceToMediaEngine(::windows::core::from_raw_borrowed(&destination)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
TransferSourceToMediaEngine: TransferSourceToMediaEngine::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineTransferSource as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaEngineWebSupport_Impl: Sized {
fn ShouldDelayTheLoadEvent(&self) -> super::super::Foundation::BOOL;
fn ConnectWebAudio(&self, dwsamplerate: u32) -> ::windows::core::Result<IAudioSourceProvider>;
fn DisconnectWebAudio(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaEngineWebSupport {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaEngineWebSupport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>() -> IMFMediaEngineWebSupport_Vtbl {
unsafe extern "system" fn ShouldDelayTheLoadEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldDelayTheLoadEvent()
}
unsafe extern "system" fn ConnectWebAudio<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsamplerate: u32, ppsourceprovider: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ConnectWebAudio(::core::mem::transmute_copy(&dwsamplerate)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsourceprovider, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DisconnectWebAudio<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisconnectWebAudio().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ShouldDelayTheLoadEvent: ShouldDelayTheLoadEvent::<Identity, Impl, OFFSET>,
ConnectWebAudio: ConnectWebAudio::<Identity, Impl, OFFSET>,
DisconnectWebAudio: DisconnectWebAudio::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEngineWebSupport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaError_Impl: Sized {
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 ::windows::core::RuntimeName for IMFMediaError {}
impl IMFMediaError_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaError_Impl, const OFFSET: isize>() -> IMFMediaError_Vtbl {
unsafe extern "system" fn GetErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaError_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u16 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetErrorCode()
}
unsafe extern "system" fn GetExtendedErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaError_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetExtendedErrorCode().into()
}
unsafe extern "system" fn SetErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaError_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, error: MF_MEDIA_ENGINE_ERR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetErrorCode(::core::mem::transmute_copy(&error)).into()
}
unsafe extern "system" fn SetExtendedErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaError_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, error: ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetExtendedErrorCode(::core::mem::transmute_copy(&error)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetErrorCode: GetErrorCode::<Identity, Impl, OFFSET>,
GetExtendedErrorCode: GetExtendedErrorCode::<Identity, Impl, OFFSET>,
SetErrorCode: SetErrorCode::<Identity, Impl, OFFSET>,
SetExtendedErrorCode: SetExtendedErrorCode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaError as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaEvent_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaEvent {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaEvent_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEvent_Impl, const OFFSET: isize>() -> IMFMediaEvent_Vtbl {
unsafe extern "system" fn GetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmet: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmet, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetExtendedType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidextendedtype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetExtendedType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidextendedtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phrstatus: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStatus() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phrstatus, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetValue() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetType: GetType::<Identity, Impl, OFFSET>,
GetExtendedType: GetExtendedType::<Identity, Impl, OFFSET>,
GetStatus: GetStatus::<Identity, Impl, OFFSET>,
GetValue: GetValue::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEvent as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaEventGenerator_Impl: Sized {
fn GetEvent(&self, dwflags: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS) -> ::windows::core::Result<IMFMediaEvent>;
fn BeginGetEvent(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndGetEvent(&self, presult: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaEventGenerator {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaEventGenerator_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEventGenerator_Impl, const OFFSET: isize>() -> IMFMediaEventGenerator_Vtbl {
unsafe extern "system" fn GetEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEvent(::core::mem::transmute_copy(&dwflags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppevent, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginGetEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginGetEvent(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndGetEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndGetEvent(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppevent, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn QueueEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.QueueEvent(::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, Impl, OFFSET>,
BeginGetEvent: BeginGetEvent::<Identity, Impl, OFFSET>,
EndGetEvent: EndGetEvent::<Identity, Impl, OFFSET>,
QueueEvent: QueueEvent::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaEventQueue_Impl: Sized {
fn GetEvent(&self, dwflags: u32) -> ::windows::core::Result<IMFMediaEvent>;
fn BeginGetEvent(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndGetEvent(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<IMFMediaEvent>;
fn QueueEvent(&self, pevent: ::core::option::Option<&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: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn Shutdown(&self) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaEventQueue {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaEventQueue_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEventQueue_Impl, const OFFSET: isize>() -> IMFMediaEventQueue_Vtbl {
unsafe extern "system" fn GetEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwflags: u32, ppevent: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEvent(::core::mem::transmute_copy(&dwflags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppevent, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginGetEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginGetEvent(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndGetEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndGetEvent(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppevent, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn QueueEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.QueueEvent(::windows::core::from_raw_borrowed(&pevent)).into()
}
unsafe extern "system" fn QueueEventParamVar<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.QueueEventParamVar(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.QueueEventParamUnk(::core::mem::transmute_copy(&met), ::core::mem::transmute_copy(&guidextendedtype), ::core::mem::transmute_copy(&hrstatus), ::windows::core::from_raw_borrowed(&punk)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEvent: GetEvent::<Identity, Impl, OFFSET>,
BeginGetEvent: BeginGetEvent::<Identity, Impl, OFFSET>,
EndGetEvent: EndGetEvent::<Identity, Impl, OFFSET>,
QueueEvent: QueueEvent::<Identity, Impl, OFFSET>,
QueueEventParamVar: QueueEventParamVar::<Identity, Impl, OFFSET>,
QueueEventParamUnk: QueueEventParamUnk::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaEventQueue as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaKeySession_Impl: Sized {
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 ::windows::core::RuntimeName for IMFMediaKeySession {}
impl IMFMediaKeySession_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession_Impl, const OFFSET: isize>() -> IMFMediaKeySession_Vtbl {
unsafe extern "system" fn GetError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, code: *mut u16, systemcode: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetError(::core::mem::transmute_copy(&code), ::core::mem::transmute_copy(&systemcode)).into()
}
unsafe extern "system" fn KeySystem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.KeySystem() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(keysystem, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SessionId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, sessionid: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SessionId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(sessionid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Update<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: *const u8, cb: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Update(::core::mem::transmute_copy(&key), ::core::mem::transmute_copy(&cb)).into()
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetError: GetError::<Identity, Impl, OFFSET>,
KeySystem: KeySystem::<Identity, Impl, OFFSET>,
SessionId: SessionId::<Identity, Impl, OFFSET>,
Update: Update::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeySession as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaKeySession2_Impl: Sized + 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<super::super::Foundation::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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaKeySession2 {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaKeySession2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>() -> IMFMediaKeySession2_Vtbl {
unsafe extern "system" fn get_KeyStatuses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pkeystatusesarray: *mut *mut MFMediaKeyStatus, pusize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.get_KeyStatuses(::core::mem::transmute_copy(&pkeystatusesarray), ::core::mem::transmute_copy(&pusize)).into()
}
unsafe extern "system" fn Load<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrsessionid: ::std::mem::MaybeUninit<::windows::core::BSTR>, pfloaded: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Load(::core::mem::transmute(&bstrsessionid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfloaded, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GenerateRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, initdatatype: ::std::mem::MaybeUninit<::windows::core::BSTR>, pbinitdata: *const u8, cb: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GenerateRequest(::core::mem::transmute(&initdatatype), ::core::mem::transmute_copy(&pbinitdata), ::core::mem::transmute_copy(&cb)).into()
}
unsafe extern "system" fn Expiration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dblexpiration: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Expiration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(dblexpiration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove().into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: IMFMediaKeySession_Vtbl::new::<Identity, Impl, OFFSET>(),
get_KeyStatuses: get_KeyStatuses::<Identity, Impl, OFFSET>,
Load: Load::<Identity, Impl, OFFSET>,
GenerateRequest: GenerateRequest::<Identity, Impl, OFFSET>,
Expiration: Expiration::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeySession2 as ::windows::core::ComInterface>::IID || iid == &<IMFMediaKeySession as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaKeySessionNotify_Impl: Sized {
fn KeyMessage(&self, destinationurl: &::windows::core::BSTR, message: *const u8, cb: u32);
fn KeyAdded(&self);
fn KeyError(&self, code: u16, systemcode: u32);
}
impl ::windows::core::RuntimeName for IMFMediaKeySessionNotify {}
impl IMFMediaKeySessionNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>() -> IMFMediaKeySessionNotify_Vtbl {
unsafe extern "system" fn KeyMessage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, destinationurl: ::std::mem::MaybeUninit<::windows::core::BSTR>, message: *const u8, cb: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyMessage(::core::mem::transmute(&destinationurl), ::core::mem::transmute_copy(&message), ::core::mem::transmute_copy(&cb))
}
unsafe extern "system" fn KeyAdded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyAdded()
}
unsafe extern "system" fn KeyError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, code: u16, systemcode: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyError(::core::mem::transmute_copy(&code), ::core::mem::transmute_copy(&systemcode))
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
KeyMessage: KeyMessage::<Identity, Impl, OFFSET>,
KeyAdded: KeyAdded::<Identity, Impl, OFFSET>,
KeyError: KeyError::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeySessionNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaKeySessionNotify2_Impl: Sized + IMFMediaKeySessionNotify_Impl {
fn KeyMessage2(&self, emessagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, destinationurl: &::windows::core::BSTR, pbmessage: *const u8, cbmessage: u32);
fn KeyStatusChange(&self);
}
impl ::windows::core::RuntimeName for IMFMediaKeySessionNotify2 {}
impl IMFMediaKeySessionNotify2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify2_Impl, const OFFSET: isize>() -> IMFMediaKeySessionNotify2_Vtbl {
unsafe extern "system" fn KeyMessage2<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, emessagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, destinationurl: ::std::mem::MaybeUninit<::windows::core::BSTR>, pbmessage: *const u8, cbmessage: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyMessage2(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySessionNotify2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyStatusChange()
}
Self {
base__: IMFMediaKeySessionNotify_Vtbl::new::<Identity, Impl, OFFSET>(),
KeyMessage2: KeyMessage2::<Identity, Impl, OFFSET>,
KeyStatusChange: KeyStatusChange::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeySessionNotify2 as ::windows::core::ComInterface>::IID || iid == &<IMFMediaKeySessionNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFMediaKeySystemAccess_Impl: Sized {
fn CreateMediaKeys(&self, pcdmcustomconfig: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFMediaKeySystemAccess {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFMediaKeySystemAccess_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>() -> IMFMediaKeySystemAccess_Vtbl {
unsafe extern "system" fn CreateMediaKeys<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMediaKeys(::windows::core::from_raw_borrowed(&pcdmcustomconfig)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppkeys, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SupportedConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppsupportedconfiguration: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SupportedConfiguration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsupportedconfiguration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn KeySystem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pkeysystem: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.KeySystem() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pkeysystem, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateMediaKeys: CreateMediaKeys::<Identity, Impl, OFFSET>,
SupportedConfiguration: SupportedConfiguration::<Identity, Impl, OFFSET>,
KeySystem: KeySystem::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeySystemAccess as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaKeys_Impl: Sized {
fn CreateSession(&self, mimetype: &::windows::core::BSTR, initdata: *const u8, cb: u32, customdata: *const u8, cbcustomdata: u32, notify: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFMediaKeys {}
impl IMFMediaKeys_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys_Impl, const OFFSET: isize>() -> IMFMediaKeys_Vtbl {
unsafe extern "system" fn CreateSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, mimetype: ::std::mem::MaybeUninit<::windows::core::BSTR>, 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateSession(::core::mem::transmute(&mimetype), ::core::mem::transmute_copy(&initdata), ::core::mem::transmute_copy(&cb), ::core::mem::transmute_copy(&customdata), ::core::mem::transmute_copy(&cbcustomdata), ::windows::core::from_raw_borrowed(&notify)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsession, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn KeySystem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, keysystem: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.KeySystem() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(keysystem, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
unsafe extern "system" fn GetSuspendNotify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, notify: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSuspendNotify() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(notify, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateSession: CreateSession::<Identity, Impl, OFFSET>,
KeySystem: KeySystem::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
GetSuspendNotify: GetSuspendNotify::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeys as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaKeys2_Impl: Sized + IMFMediaKeys_Impl {
fn CreateSession2(&self, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFMediaKeys2 {}
impl IMFMediaKeys2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys2_Impl, const OFFSET: isize>() -> IMFMediaKeys2_Vtbl {
unsafe extern "system" fn CreateSession2<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateSession2(::core::mem::transmute_copy(&esessiontype), ::windows::core::from_raw_borrowed(&pmfmediakeysessionnotify2)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsession, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetServerCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbservercertificate: *const u8, cb: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetServerCertificate(::core::mem::transmute_copy(&pbservercertificate), ::core::mem::transmute_copy(&cb)).into()
}
unsafe extern "system" fn GetDOMException<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaKeys2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, systemcode: ::windows::core::HRESULT, code: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDOMException(::core::mem::transmute_copy(&systemcode)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(code, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFMediaKeys_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateSession2: CreateSession2::<Identity, Impl, OFFSET>,
SetServerCertificate: SetServerCertificate::<Identity, Impl, OFFSET>,
GetDOMException: GetDOMException::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaKeys2 as ::windows::core::ComInterface>::IID || iid == &<IMFMediaKeys as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaSession_Impl: Sized + IMFMediaEventGenerator_Impl {
fn SetTopology(&self, dwsettopologyflags: u32, ptopology: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaSession {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaSession_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>() -> IMFMediaSession_Vtbl {
unsafe extern "system" fn SetTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsettopologyflags: u32, ptopology: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTopology(::core::mem::transmute_copy(&dwsettopologyflags), ::windows::core::from_raw_borrowed(&ptopology)).into()
}
unsafe extern "system" fn ClearTopologies<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearTopologies().into()
}
unsafe extern "system" fn Start<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start(::core::mem::transmute_copy(&pguidtimeformat), ::core::mem::transmute_copy(&pvarstartposition)).into()
}
unsafe extern "system" fn Pause<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Pause().into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
unsafe extern "system" fn GetClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppclock: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetClock() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppclock, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSessionCapabilities<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcaps: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSessionCapabilities() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcaps, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFullTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFullTopology(::core::mem::transmute_copy(&dwgetfulltopologyflags), ::core::mem::transmute_copy(&topoid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppfulltopology, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, Impl, OFFSET>(),
SetTopology: SetTopology::<Identity, Impl, OFFSET>,
ClearTopologies: ClearTopologies::<Identity, Impl, OFFSET>,
Start: Start::<Identity, Impl, OFFSET>,
Pause: Pause::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
GetClock: GetClock::<Identity, Impl, OFFSET>,
GetSessionCapabilities: GetSessionCapabilities::<Identity, Impl, OFFSET>,
GetFullTopology: GetFullTopology::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSession as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaSharingEngine_Impl: Sized + IMFMediaEngine_Impl {
fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaSharingEngine {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaSharingEngine_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSharingEngine_Impl, const OFFSET: isize>() -> IMFMediaSharingEngine_Vtbl {
unsafe extern "system" fn GetDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSharingEngine_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdevice: *mut DEVICE_INFO) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDevice(::core::mem::transmute_copy(&pdevice)).into()
}
Self { base__: IMFMediaEngine_Vtbl::new::<Identity, Impl, OFFSET>(), GetDevice: GetDevice::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSharingEngine as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEngine as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSharingEngineClassFactory_Impl: Sized {
fn CreateInstance(&self, dwflags: u32, pattr: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<IMFMediaSharingEngine>;
}
impl ::windows::core::RuntimeName for IMFMediaSharingEngineClassFactory {}
impl IMFMediaSharingEngineClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSharingEngineClassFactory_Impl, const OFFSET: isize>() -> IMFMediaSharingEngineClassFactory_Vtbl {
unsafe extern "system" fn CreateInstance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateInstance(::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pattr)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppengine, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSharingEngineClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSink_Impl: Sized {
fn GetCharacteristics(&self) -> ::windows::core::Result<u32>;
fn AddStreamSink(&self, dwstreamsinkidentifier: u32, pmediatype: ::core::option::Option<&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: ::core::option::Option<&IMFPresentationClock>) -> ::windows::core::Result<()>;
fn GetPresentationClock(&self) -> ::windows::core::Result<IMFPresentationClock>;
fn Shutdown(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaSink {}
impl IMFMediaSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>() -> IMFMediaSink_Vtbl {
unsafe extern "system" fn GetCharacteristics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcharacteristics: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCharacteristics() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcharacteristics, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddStreamSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddStreamSink(::core::mem::transmute_copy(&dwstreamsinkidentifier), ::windows::core::from_raw_borrowed(&pmediatype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppstreamsink, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveStreamSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamsinkidentifier: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveStreamSink(::core::mem::transmute_copy(&dwstreamsinkidentifier)).into()
}
unsafe extern "system" fn GetStreamSinkCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcstreamsinkcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamSinkCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcstreamsinkcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamSinkByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppstreamsink: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamSinkByIndex(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppstreamsink, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamSinkById<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamsinkidentifier: u32, ppstreamsink: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamSinkById(::core::mem::transmute_copy(&dwstreamsinkidentifier)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppstreamsink, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetPresentationClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppresentationclock: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPresentationClock(::windows::core::from_raw_borrowed(&ppresentationclock)).into()
}
unsafe extern "system" fn GetPresentationClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pppresentationclock: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPresentationClock() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pppresentationclock, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCharacteristics: GetCharacteristics::<Identity, Impl, OFFSET>,
AddStreamSink: AddStreamSink::<Identity, Impl, OFFSET>,
RemoveStreamSink: RemoveStreamSink::<Identity, Impl, OFFSET>,
GetStreamSinkCount: GetStreamSinkCount::<Identity, Impl, OFFSET>,
GetStreamSinkByIndex: GetStreamSinkByIndex::<Identity, Impl, OFFSET>,
GetStreamSinkById: GetStreamSinkById::<Identity, Impl, OFFSET>,
SetPresentationClock: SetPresentationClock::<Identity, Impl, OFFSET>,
GetPresentationClock: GetPresentationClock::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSinkPreroll_Impl: Sized {
fn NotifyPreroll(&self, hnsupcomingstarttime: i64) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaSinkPreroll {}
impl IMFMediaSinkPreroll_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSinkPreroll_Impl, const OFFSET: isize>() -> IMFMediaSinkPreroll_Vtbl {
unsafe extern "system" fn NotifyPreroll<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSinkPreroll_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnsupcomingstarttime: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyPreroll(::core::mem::transmute_copy(&hnsupcomingstarttime)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NotifyPreroll: NotifyPreroll::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSinkPreroll as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaSource_Impl: Sized + IMFMediaEventGenerator_Impl {
fn GetCharacteristics(&self) -> ::windows::core::Result<u32>;
fn CreatePresentationDescriptor(&self) -> ::windows::core::Result<IMFPresentationDescriptor>;
fn Start(&self, ppresentationdescriptor: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaSource {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaSource_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource_Impl, const OFFSET: isize>() -> IMFMediaSource_Vtbl {
unsafe extern "system" fn GetCharacteristics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcharacteristics: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCharacteristics() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcharacteristics, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreatePresentationDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pppresentationdescriptor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreatePresentationDescriptor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pppresentationdescriptor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Start<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start(::windows::core::from_raw_borrowed(&ppresentationdescriptor), ::core::mem::transmute_copy(&pguidtimeformat), ::core::mem::transmute_copy(&pvarstartposition)).into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn Pause<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Pause().into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, Impl, OFFSET>(),
GetCharacteristics: GetCharacteristics::<Identity, Impl, OFFSET>,
CreatePresentationDescriptor: CreatePresentationDescriptor::<Identity, Impl, OFFSET>,
Start: Start::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
Pause: Pause::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSource as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaSource2_Impl: Sized + IMFMediaSourceEx_Impl {
fn SetMediaType(&self, dwstreamid: u32, pmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaSource2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaSource2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource2_Impl, const OFFSET: isize>() -> IMFMediaSource2_Vtbl {
unsafe extern "system" fn SetMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSource2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, pmediatype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMediaType(::core::mem::transmute_copy(&dwstreamid), ::windows::core::from_raw_borrowed(&pmediatype)).into()
}
Self { base__: IMFMediaSourceEx_Vtbl::new::<Identity, Impl, OFFSET>(), SetMediaType: SetMediaType::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSource2 as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID || iid == &<IMFMediaSource as ::windows::core::ComInterface>::IID || iid == &<IMFMediaSourceEx as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaSourceEx_Impl: Sized + IMFMediaSource_Impl {
fn GetSourceAttributes(&self) -> ::windows::core::Result<IMFAttributes>;
fn GetStreamAttributes(&self, dwstreamidentifier: u32) -> ::windows::core::Result<IMFAttributes>;
fn SetD3DManager(&self, pmanager: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaSourceEx {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaSourceEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceEx_Impl, const OFFSET: isize>() -> IMFMediaSourceEx_Vtbl {
unsafe extern "system" fn GetSourceAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSourceAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamidentifier: u32, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamAttributes(::core::mem::transmute_copy(&dwstreamidentifier)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetD3DManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmanager: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetD3DManager(::windows::core::from_raw_borrowed(&pmanager)).into()
}
Self {
base__: IMFMediaSource_Vtbl::new::<Identity, Impl, OFFSET>(),
GetSourceAttributes: GetSourceAttributes::<Identity, Impl, OFFSET>,
GetStreamAttributes: GetStreamAttributes::<Identity, Impl, OFFSET>,
SetD3DManager: SetD3DManager::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSourceEx as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID || iid == &<IMFMediaSource as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaSourceExtension_Impl: Sized {
fn GetSourceBuffers(&self) -> ::core::option::Option<IMFSourceBufferList>;
fn GetActiveSourceBuffers(&self) -> ::core::option::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: ::core::option::Option<&IMFSourceBufferNotify>) -> ::windows::core::Result<IMFSourceBuffer>;
fn RemoveSourceBuffer(&self, psourcebuffer: ::core::option::Option<&IMFSourceBuffer>) -> ::windows::core::Result<()>;
fn SetEndOfStream(&self, error: MF_MSE_ERROR) -> ::windows::core::Result<()>;
fn IsTypeSupported(&self, r#type: &::windows::core::BSTR) -> super::super::Foundation::BOOL;
fn GetSourceBuffer(&self, dwstreamindex: u32) -> ::core::option::Option<IMFSourceBuffer>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaSourceExtension {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaSourceExtension_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>() -> IMFMediaSourceExtension_Vtbl {
unsafe extern "system" fn GetSourceBuffers<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::core::option::Option<IMFSourceBufferList> {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSourceBuffers()
}
unsafe extern "system" fn GetActiveSourceBuffers<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::core::option::Option<IMFSourceBufferList> {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetActiveSourceBuffers()
}
unsafe extern "system" fn GetReadyState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_MSE_READY {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetReadyState()
}
unsafe extern "system" fn GetDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDuration()
}
unsafe extern "system" fn SetDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, duration: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDuration(::core::mem::transmute_copy(&duration)).into()
}
unsafe extern "system" fn AddSourceBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: ::std::mem::MaybeUninit<::windows::core::BSTR>, pnotify: *mut ::core::ffi::c_void, ppsourcebuffer: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddSourceBuffer(::core::mem::transmute(&r#type), ::windows::core::from_raw_borrowed(&pnotify)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsourcebuffer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveSourceBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psourcebuffer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveSourceBuffer(::windows::core::from_raw_borrowed(&psourcebuffer)).into()
}
unsafe extern "system" fn SetEndOfStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, error: MF_MSE_ERROR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEndOfStream(::core::mem::transmute_copy(&error)).into()
}
unsafe extern "system" fn IsTypeSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsTypeSupported(::core::mem::transmute(&r#type))
}
unsafe extern "system" fn GetSourceBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::core::option::Option<IMFSourceBuffer> {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSourceBuffer(::core::mem::transmute_copy(&dwstreamindex))
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSourceBuffers: GetSourceBuffers::<Identity, Impl, OFFSET>,
GetActiveSourceBuffers: GetActiveSourceBuffers::<Identity, Impl, OFFSET>,
GetReadyState: GetReadyState::<Identity, Impl, OFFSET>,
GetDuration: GetDuration::<Identity, Impl, OFFSET>,
SetDuration: SetDuration::<Identity, Impl, OFFSET>,
AddSourceBuffer: AddSourceBuffer::<Identity, Impl, OFFSET>,
RemoveSourceBuffer: RemoveSourceBuffer::<Identity, Impl, OFFSET>,
SetEndOfStream: SetEndOfStream::<Identity, Impl, OFFSET>,
IsTypeSupported: IsTypeSupported::<Identity, Impl, OFFSET>,
GetSourceBuffer: GetSourceBuffer::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSourceExtension as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSourceExtensionLiveSeekableRange_Impl: Sized {
fn SetLiveSeekableRange(&self, start: f64, end: f64) -> ::windows::core::Result<()>;
fn ClearLiveSeekableRange(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaSourceExtensionLiveSeekableRange {}
impl IMFMediaSourceExtensionLiveSeekableRange_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionLiveSeekableRange_Impl, const OFFSET: isize>() -> IMFMediaSourceExtensionLiveSeekableRange_Vtbl {
unsafe extern "system" fn SetLiveSeekableRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionLiveSeekableRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, start: f64, end: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLiveSeekableRange(::core::mem::transmute_copy(&start), ::core::mem::transmute_copy(&end)).into()
}
unsafe extern "system" fn ClearLiveSeekableRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionLiveSeekableRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearLiveSeekableRange().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetLiveSeekableRange: SetLiveSeekableRange::<Identity, Impl, OFFSET>,
ClearLiveSeekableRange: ClearLiveSeekableRange::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSourceExtensionLiveSeekableRange as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSourceExtensionNotify_Impl: Sized {
fn OnSourceOpen(&self);
fn OnSourceEnded(&self);
fn OnSourceClose(&self);
}
impl ::windows::core::RuntimeName for IMFMediaSourceExtensionNotify {}
impl IMFMediaSourceExtensionNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>() -> IMFMediaSourceExtensionNotify_Vtbl {
unsafe extern "system" fn OnSourceOpen<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSourceOpen()
}
unsafe extern "system" fn OnSourceEnded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSourceEnded()
}
unsafe extern "system" fn OnSourceClose<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSourceClose()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnSourceOpen: OnSourceOpen::<Identity, Impl, OFFSET>,
OnSourceEnded: OnSourceEnded::<Identity, Impl, OFFSET>,
OnSourceClose: OnSourceClose::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSourceExtensionNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSourcePresentationProvider_Impl: Sized {
fn ForceEndOfPresentation(&self, ppresentationdescriptor: ::core::option::Option<&IMFPresentationDescriptor>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaSourcePresentationProvider {}
impl IMFMediaSourcePresentationProvider_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourcePresentationProvider_Impl, const OFFSET: isize>() -> IMFMediaSourcePresentationProvider_Vtbl {
unsafe extern "system" fn ForceEndOfPresentation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourcePresentationProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppresentationdescriptor: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ForceEndOfPresentation(::windows::core::from_raw_borrowed(&ppresentationdescriptor)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), ForceEndOfPresentation: ForceEndOfPresentation::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSourcePresentationProvider as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaSourceTopologyProvider_Impl: Sized {
fn GetMediaSourceTopology(&self, ppresentationdescriptor: ::core::option::Option<&IMFPresentationDescriptor>) -> ::windows::core::Result<IMFTopology>;
}
impl ::windows::core::RuntimeName for IMFMediaSourceTopologyProvider {}
impl IMFMediaSourceTopologyProvider_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaSourceTopologyProvider_Impl, const OFFSET: isize>() -> IMFMediaSourceTopologyProvider_Vtbl {
unsafe extern "system" fn GetMediaSourceTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaSourceTopology(::windows::core::from_raw_borrowed(&ppresentationdescriptor)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptopology, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetMediaSourceTopology: GetMediaSourceTopology::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaSourceTopologyProvider as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaStream_Impl: Sized + IMFMediaEventGenerator_Impl {
fn GetMediaSource(&self) -> ::windows::core::Result<IMFMediaSource>;
fn GetStreamDescriptor(&self) -> ::windows::core::Result<IMFStreamDescriptor>;
fn RequestSample(&self, ptoken: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaStream {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaStream_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream_Impl, const OFFSET: isize>() -> IMFMediaStream_Vtbl {
unsafe extern "system" fn GetMediaSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediasource: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediasource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppstreamdescriptor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamDescriptor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppstreamdescriptor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RequestSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptoken: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RequestSample(::windows::core::from_raw_borrowed(&ptoken)).into()
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, Impl, OFFSET>(),
GetMediaSource: GetMediaSource::<Identity, Impl, OFFSET>,
GetStreamDescriptor: GetStreamDescriptor::<Identity, Impl, OFFSET>,
RequestSample: RequestSample::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaStream as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaStream2_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaStream2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaStream2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream2_Impl, const OFFSET: isize>() -> IMFMediaStream2_Vtbl {
unsafe extern "system" fn SetStreamState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: MF_STREAM_STATE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamState(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetStreamState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStream2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MF_STREAM_STATE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFMediaStream_Vtbl::new::<Identity, Impl, OFFSET>(),
SetStreamState: SetStreamState::<Identity, Impl, OFFSET>,
GetStreamState: GetStreamState::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaStream2 as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID || iid == &<IMFMediaStream as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaStreamSourceSampleRequest_Impl: Sized {
fn SetSample(&self, value: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFMediaStreamSourceSampleRequest {}
impl IMFMediaStreamSourceSampleRequest_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStreamSourceSampleRequest_Impl, const OFFSET: isize>() -> IMFMediaStreamSourceSampleRequest_Vtbl {
unsafe extern "system" fn SetSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaStreamSourceSampleRequest_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSample(::windows::core::from_raw_borrowed(&value)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetSample: SetSample::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaStreamSourceSampleRequest as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFMediaTimeRange_Impl: Sized {
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) -> super::super::Foundation::BOOL;
fn AddRange(&self, starttime: f64, endtime: f64) -> ::windows::core::Result<()>;
fn Clear(&self) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFMediaTimeRange {}
#[cfg(feature = "Win32_Foundation")]
impl IMFMediaTimeRange_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>() -> IMFMediaTimeRange_Vtbl {
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLength()
}
unsafe extern "system" fn GetStart<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, pstart: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStart(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pstart, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetEnd<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, pend: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEnd(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pend, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ContainsTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, time: f64) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ContainsTime(::core::mem::transmute_copy(&time))
}
unsafe extern "system" fn AddRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, starttime: f64, endtime: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddRange(::core::mem::transmute_copy(&starttime), ::core::mem::transmute_copy(&endtime)).into()
}
unsafe extern "system" fn Clear<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Clear().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, Impl, OFFSET>,
GetStart: GetStart::<Identity, Impl, OFFSET>,
GetEnd: GetEnd::<Identity, Impl, OFFSET>,
ContainsTime: ContainsTime::<Identity, Impl, OFFSET>,
AddRange: AddRange::<Identity, Impl, OFFSET>,
Clear: Clear::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaTimeRange as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMediaType_Impl: Sized + IMFAttributes_Impl {
fn GetMajorType(&self) -> ::windows::core::Result<::windows::core::GUID>;
fn IsCompressedFormat(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn IsEqual(&self, pimediatype: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMediaType {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMediaType_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaType_Impl, const OFFSET: isize>() -> IMFMediaType_Vtbl {
unsafe extern "system" fn GetMajorType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaType_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidmajortype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMajorType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidmajortype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsCompressedFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaType_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfcompressed: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsCompressedFormat() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfcompressed, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsEqual<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaType_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pimediatype: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsEqual(::windows::core::from_raw_borrowed(&pimediatype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRepresentation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetRepresentation(::core::mem::transmute(&guidrepresentation), ::core::mem::transmute_copy(&ppvrepresentation)).into()
}
unsafe extern "system" fn FreeRepresentation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaType_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidrepresentation: ::windows::core::GUID, pvrepresentation: *const ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FreeRepresentation(::core::mem::transmute(&guidrepresentation), ::core::mem::transmute_copy(&pvrepresentation)).into()
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetMajorType: GetMajorType::<Identity, Impl, OFFSET>,
IsCompressedFormat: IsCompressedFormat::<Identity, Impl, OFFSET>,
IsEqual: IsEqual::<Identity, Impl, OFFSET>,
GetRepresentation: GetRepresentation::<Identity, Impl, OFFSET>,
FreeRepresentation: FreeRepresentation::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaType as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMediaTypeHandler_Impl: Sized {
fn IsMediaTypeSupported(&self, pmediatype: ::core::option::Option<&IMFMediaType>, ppmediatype: *mut ::core::option::Option<IMFMediaType>) -> ::windows::core::Result<()>;
fn GetMediaTypeCount(&self) -> ::windows::core::Result<u32>;
fn GetMediaTypeByIndex(&self, dwindex: u32) -> ::windows::core::Result<IMFMediaType>;
fn SetCurrentMediaType(&self, pmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
fn GetCurrentMediaType(&self) -> ::windows::core::Result<IMFMediaType>;
fn GetMajorType(&self) -> ::windows::core::Result<::windows::core::GUID>;
}
impl ::windows::core::RuntimeName for IMFMediaTypeHandler {}
impl IMFMediaTypeHandler_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTypeHandler_Impl, const OFFSET: isize>() -> IMFMediaTypeHandler_Vtbl {
unsafe extern "system" fn IsMediaTypeSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsMediaTypeSupported(::windows::core::from_raw_borrowed(&pmediatype), ::core::mem::transmute_copy(&ppmediatype)).into()
}
unsafe extern "system" fn GetMediaTypeCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwtypecount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaTypeCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwtypecount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMediaTypeByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, pptype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaTypeByIndex(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetCurrentMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmediatype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentMediaType(::windows::core::from_raw_borrowed(&pmediatype)).into()
}
unsafe extern "system" fn GetCurrentMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentMediaType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMajorType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidmajortype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMajorType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidmajortype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsMediaTypeSupported: IsMediaTypeSupported::<Identity, Impl, OFFSET>,
GetMediaTypeCount: GetMediaTypeCount::<Identity, Impl, OFFSET>,
GetMediaTypeByIndex: GetMediaTypeByIndex::<Identity, Impl, OFFSET>,
SetCurrentMediaType: SetCurrentMediaType::<Identity, Impl, OFFSET>,
GetCurrentMediaType: GetCurrentMediaType::<Identity, Impl, OFFSET>,
GetMajorType: GetMajorType::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMediaTypeHandler as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFMetadata_Impl: Sized {
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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFMetadata {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFMetadata_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadata_Impl, const OFFSET: isize>() -> IMFMetadata_Vtbl {
unsafe extern "system" fn SetLanguage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadata_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszrfc1766: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLanguage(::core::mem::transmute(&pwszrfc1766)).into()
}
unsafe extern "system" fn GetLanguage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadata_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppwszrfc1766: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetLanguage() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppwszrfc1766, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetAllLanguages<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadata_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppvlanguages: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAllLanguages() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppvlanguages, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProperty<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProperty(::core::mem::transmute(&pwszname), ::core::mem::transmute_copy(&ppvvalue)).into()
}
unsafe extern "system" fn GetProperty<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProperty(::core::mem::transmute(&pwszname)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppvvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DeleteProperty<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadata_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszname: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteProperty(::core::mem::transmute(&pwszname)).into()
}
unsafe extern "system" fn GetAllPropertyNames<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadata_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppvnames: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAllPropertyNames() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppvnames, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetLanguage: SetLanguage::<Identity, Impl, OFFSET>,
GetLanguage: GetLanguage::<Identity, Impl, OFFSET>,
GetAllLanguages: GetAllLanguages::<Identity, Impl, OFFSET>,
SetProperty: SetProperty::<Identity, Impl, OFFSET>,
GetProperty: GetProperty::<Identity, Impl, OFFSET>,
DeleteProperty: DeleteProperty::<Identity, Impl, OFFSET>,
GetAllPropertyNames: GetAllPropertyNames::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMetadata as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMetadataProvider_Impl: Sized {
fn GetMFMetadata(&self, ppresentationdescriptor: ::core::option::Option<&IMFPresentationDescriptor>, dwstreamidentifier: u32, dwflags: u32) -> ::windows::core::Result<IMFMetadata>;
}
impl ::windows::core::RuntimeName for IMFMetadataProvider {}
impl IMFMetadataProvider_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMetadataProvider_Impl, const OFFSET: isize>() -> IMFMetadataProvider_Vtbl {
unsafe extern "system" fn GetMFMetadata<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMFMetadata(::windows::core::from_raw_borrowed(&ppresentationdescriptor), ::core::mem::transmute_copy(&dwstreamidentifier), ::core::mem::transmute_copy(&dwflags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmfmetadata, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetMFMetadata: GetMFMetadata::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMetadataProvider as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMuxStreamAttributesManager_Impl: Sized {
fn GetStreamCount(&self) -> ::windows::core::Result<u32>;
fn GetAttributes(&self, dwmuxstreamindex: u32) -> ::windows::core::Result<IMFAttributes>;
}
impl ::windows::core::RuntimeName for IMFMuxStreamAttributesManager {}
impl IMFMuxStreamAttributesManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamAttributesManager_Impl, const OFFSET: isize>() -> IMFMuxStreamAttributesManager_Vtbl {
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamAttributesManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwmuxstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwmuxstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamAttributesManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmuxstreamindex: u32, ppstreamattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAttributes(::core::mem::transmute_copy(&dwmuxstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppstreamattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetAttributes: GetAttributes::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMuxStreamAttributesManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMuxStreamMediaTypeManager_Impl: Sized {
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 ::windows::core::RuntimeName for IMFMuxStreamMediaTypeManager {}
impl IMFMuxStreamMediaTypeManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>() -> IMFMuxStreamMediaTypeManager_Vtbl {
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwmuxstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwmuxstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmuxstreamindex: u32, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaType(::core::mem::transmute_copy(&dwmuxstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamConfigurationCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamConfigurationCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddStreamConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ullstreammask: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddStreamConfiguration(::core::mem::transmute_copy(&ullstreammask)).into()
}
unsafe extern "system" fn RemoveStreamConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ullstreammask: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveStreamConfiguration(::core::mem::transmute_copy(&ullstreammask)).into()
}
unsafe extern "system" fn GetStreamConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ulindex: u32, pullstreammask: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamConfiguration(::core::mem::transmute_copy(&ulindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pullstreammask, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetMediaType: GetMediaType::<Identity, Impl, OFFSET>,
GetStreamConfigurationCount: GetStreamConfigurationCount::<Identity, Impl, OFFSET>,
AddStreamConfiguration: AddStreamConfiguration::<Identity, Impl, OFFSET>,
RemoveStreamConfiguration: RemoveStreamConfiguration::<Identity, Impl, OFFSET>,
GetStreamConfiguration: GetStreamConfiguration::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMuxStreamMediaTypeManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFMuxStreamSampleManager_Impl: Sized {
fn GetStreamCount(&self) -> ::windows::core::Result<u32>;
fn GetSample(&self, dwmuxstreamindex: u32) -> ::windows::core::Result<IMFSample>;
fn GetStreamConfiguration(&self) -> u64;
}
impl ::windows::core::RuntimeName for IMFMuxStreamSampleManager {}
impl IMFMuxStreamSampleManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>() -> IMFMuxStreamSampleManager_Vtbl {
unsafe extern "system" fn GetStreamCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwmuxstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwmuxstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmuxstreamindex: u32, ppsample: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSample(::core::mem::transmute_copy(&dwmuxstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsample, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamConfiguration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamConfiguration()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetSample: GetSample::<Identity, Impl, OFFSET>,
GetStreamConfiguration: GetStreamConfiguration::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFMuxStreamSampleManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFNetCredential_Impl: Sized {
fn SetUser(&self, pbdata: *const u8, cbdata: u32, fdataisencrypted: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn SetPassword(&self, pbdata: *const u8, cbdata: u32, fdataisencrypted: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetUser(&self, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetPassword(&self, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn LoggedOnUser(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFNetCredential {}
#[cfg(feature = "Win32_Foundation")]
impl IMFNetCredential_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredential_Impl, const OFFSET: isize>() -> IMFNetCredential_Vtbl {
unsafe extern "system" fn SetUser<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbdata: *const u8, cbdata: u32, fdataisencrypted: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUser(::core::mem::transmute_copy(&pbdata), ::core::mem::transmute_copy(&cbdata), ::core::mem::transmute_copy(&fdataisencrypted)).into()
}
unsafe extern "system" fn SetPassword<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbdata: *const u8, cbdata: u32, fdataisencrypted: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPassword(::core::mem::transmute_copy(&pbdata), ::core::mem::transmute_copy(&cbdata), ::core::mem::transmute_copy(&fdataisencrypted)).into()
}
unsafe extern "system" fn GetUser<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetUser(::core::mem::transmute_copy(&pbdata), ::core::mem::transmute_copy(&pcbdata), ::core::mem::transmute_copy(&fencryptdata)).into()
}
unsafe extern "system" fn GetPassword<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPassword(::core::mem::transmute_copy(&pbdata), ::core::mem::transmute_copy(&pcbdata), ::core::mem::transmute_copy(&fencryptdata)).into()
}
unsafe extern "system" fn LoggedOnUser<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfloggedonuser: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LoggedOnUser() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfloggedonuser, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetUser: SetUser::<Identity, Impl, OFFSET>,
SetPassword: SetPassword::<Identity, Impl, OFFSET>,
GetUser: GetUser::<Identity, Impl, OFFSET>,
GetPassword: GetPassword::<Identity, Impl, OFFSET>,
LoggedOnUser: LoggedOnUser::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetCredential as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFNetCredentialCache_Impl: Sized {
fn GetCredential(&self, pszurl: &::windows::core::PCWSTR, pszrealm: &::windows::core::PCWSTR, dwauthenticationflags: u32, ppcred: *mut ::core::option::Option<IMFNetCredential>, pdwrequirementsflags: *mut u32) -> ::windows::core::Result<()>;
fn SetGood(&self, pcred: ::core::option::Option<&IMFNetCredential>, fgood: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn SetUserOptions(&self, pcred: ::core::option::Option<&IMFNetCredential>, dwoptionsflags: u32) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFNetCredentialCache {}
#[cfg(feature = "Win32_Foundation")]
impl IMFNetCredentialCache_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredentialCache_Impl, const OFFSET: isize>() -> IMFNetCredentialCache_Vtbl {
unsafe extern "system" fn GetCredential<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCredential(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredentialCache_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcred: *mut ::core::ffi::c_void, fgood: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetGood(::windows::core::from_raw_borrowed(&pcred), ::core::mem::transmute_copy(&fgood)).into()
}
unsafe extern "system" fn SetUserOptions<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredentialCache_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcred: *mut ::core::ffi::c_void, dwoptionsflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUserOptions(::windows::core::from_raw_borrowed(&pcred), ::core::mem::transmute_copy(&dwoptionsflags)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCredential: GetCredential::<Identity, Impl, OFFSET>,
SetGood: SetGood::<Identity, Impl, OFFSET>,
SetUserOptions: SetUserOptions::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetCredentialCache as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFNetCredentialManager_Impl: Sized {
fn BeginGetCredentials(&self, pparam: *const MFNetCredentialManagerGetParam, pcallback: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndGetCredentials(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<IMFNetCredential>;
fn SetGood(&self, pcred: ::core::option::Option<&IMFNetCredential>, fgood: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFNetCredentialManager {}
#[cfg(feature = "Win32_Foundation")]
impl IMFNetCredentialManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredentialManager_Impl, const OFFSET: isize>() -> IMFNetCredentialManager_Vtbl {
unsafe extern "system" fn BeginGetCredentials<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginGetCredentials(::core::mem::transmute_copy(&pparam), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndGetCredentials<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndGetCredentials(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcred, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetGood<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCredentialManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcred: *mut ::core::ffi::c_void, fgood: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetGood(::windows::core::from_raw_borrowed(&pcred), ::core::mem::transmute_copy(&fgood)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginGetCredentials: BeginGetCredentials::<Identity, Impl, OFFSET>,
EndGetCredentials: EndGetCredentials::<Identity, Impl, OFFSET>,
SetGood: SetGood::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetCredentialManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFNetCrossOriginSupport_Impl: Sized {
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<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFNetCrossOriginSupport {}
#[cfg(feature = "Win32_Foundation")]
impl IMFNetCrossOriginSupport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>() -> IMFNetCrossOriginSupport_Vtbl {
unsafe extern "system" fn GetCrossOriginPolicy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppolicy: *mut MF_CROSS_ORIGIN_POLICY) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCrossOriginPolicy() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppolicy, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSourceOrigin<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszsourceorigin: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSourceOrigin() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wszsourceorigin, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsSameOrigin<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszurl: ::windows::core::PCWSTR, pfissameorigin: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsSameOrigin(::core::mem::transmute(&wszurl)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfissameorigin, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCrossOriginPolicy: GetCrossOriginPolicy::<Identity, Impl, OFFSET>,
GetSourceOrigin: GetSourceOrigin::<Identity, Impl, OFFSET>,
IsSameOrigin: IsSameOrigin::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetCrossOriginSupport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFNetProxyLocator_Impl: Sized {
fn FindFirstProxy(&self, pszhost: &::windows::core::PCWSTR, pszurl: &::windows::core::PCWSTR, freserved: super::super::Foundation::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>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFNetProxyLocator {}
#[cfg(feature = "Win32_Foundation")]
impl IMFNetProxyLocator_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocator_Impl, const OFFSET: isize>() -> IMFNetProxyLocator_Vtbl {
unsafe extern "system" fn FindFirstProxy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszhost: ::windows::core::PCWSTR, pszurl: ::windows::core::PCWSTR, freserved: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FindFirstProxy(::core::mem::transmute(&pszhost), ::core::mem::transmute(&pszurl), ::core::mem::transmute_copy(&freserved)).into()
}
unsafe extern "system" fn FindNextProxy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FindNextProxy().into()
}
unsafe extern "system" fn RegisterProxyResult<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hrop: ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterProxyResult(::core::mem::transmute_copy(&hrop)).into()
}
unsafe extern "system" fn GetCurrentProxy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszstr: ::windows::core::PWSTR, pcchstr: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCurrentProxy(::core::mem::transmute_copy(&pszstr), ::core::mem::transmute_copy(&pcchstr)).into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppproxylocator: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppproxylocator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
FindFirstProxy: FindFirstProxy::<Identity, Impl, OFFSET>,
FindNextProxy: FindNextProxy::<Identity, Impl, OFFSET>,
RegisterProxyResult: RegisterProxyResult::<Identity, Impl, OFFSET>,
GetCurrentProxy: GetCurrentProxy::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetProxyLocator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFNetProxyLocatorFactory_Impl: Sized {
fn CreateProxyLocator(&self, pszprotocol: &::windows::core::PCWSTR) -> ::windows::core::Result<IMFNetProxyLocator>;
}
impl ::windows::core::RuntimeName for IMFNetProxyLocatorFactory {}
impl IMFNetProxyLocatorFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetProxyLocatorFactory_Impl, const OFFSET: isize>() -> IMFNetProxyLocatorFactory_Vtbl {
unsafe extern "system" fn CreateProxyLocator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateProxyLocator(::core::mem::transmute(&pszprotocol)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppproxylocator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateProxyLocator: CreateProxyLocator::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetProxyLocatorFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFNetResourceFilter_Impl: Sized {
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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFNetResourceFilter {}
#[cfg(feature = "Win32_Foundation")]
impl IMFNetResourceFilter_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetResourceFilter_Impl, const OFFSET: isize>() -> IMFNetResourceFilter_Vtbl {
unsafe extern "system" fn OnRedirect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.OnRedirect(::core::mem::transmute(&pszurl)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvbcancel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn OnSendingRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetResourceFilter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszurl: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSendingRequest(::core::mem::transmute(&pszurl)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnRedirect: OnRedirect::<Identity, Impl, OFFSET>,
OnSendingRequest: OnSendingRequest::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetResourceFilter as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFNetSchemeHandlerConfig_Impl: Sized {
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 ::windows::core::RuntimeName for IMFNetSchemeHandlerConfig {}
impl IMFNetSchemeHandlerConfig_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>() -> IMFNetSchemeHandlerConfig_Vtbl {
unsafe extern "system" fn GetNumberOfSupportedProtocols<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcprotocols: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNumberOfSupportedProtocols() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcprotocols, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSupportedProtocolType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, nprotocolindex: u32, pnprotocoltype: *mut MFNETSOURCE_PROTOCOL_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSupportedProtocolType(::core::mem::transmute_copy(&nprotocolindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pnprotocoltype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ResetProtocolRolloverSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResetProtocolRolloverSettings().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetNumberOfSupportedProtocols: GetNumberOfSupportedProtocols::<Identity, Impl, OFFSET>,
GetSupportedProtocolType: GetSupportedProtocolType::<Identity, Impl, OFFSET>,
ResetProtocolRolloverSettings: ResetProtocolRolloverSettings::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFNetSchemeHandlerConfig as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFObjectReferenceStream_Impl: Sized {
fn SaveReference(&self, riid: *const ::windows::core::GUID, punk: ::core::option::Option<&::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 ::windows::core::RuntimeName for IMFObjectReferenceStream {}
impl IMFObjectReferenceStream_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFObjectReferenceStream_Impl, const OFFSET: isize>() -> IMFObjectReferenceStream_Vtbl {
unsafe extern "system" fn SaveReference<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SaveReference(::core::mem::transmute_copy(&riid), ::windows::core::from_raw_borrowed(&punk)).into()
}
unsafe extern "system" fn LoadReference<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LoadReference(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SaveReference: SaveReference::<Identity, Impl, OFFSET>,
LoadReference: LoadReference::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFObjectReferenceStream as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFOutputPolicy_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFOutputPolicy {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFOutputPolicy_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputPolicy_Impl, const OFFSET: isize>() -> IMFOutputPolicy_Vtbl {
unsafe extern "system" fn GenerateRequiredSchemas<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GenerateRequiredSchemas(::core::mem::transmute_copy(&dwattributes), ::core::mem::transmute(&guidoutputsubtype), ::core::mem::transmute_copy(&rgguidprotectionschemassupported), ::core::mem::transmute_copy(&cprotectionschemassupported)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pprequiredprotectionschemas, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOriginatorID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidoriginatorid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOriginatorID() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidoriginatorid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMinimumGRLVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwminimumgrlversion: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMinimumGRLVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwminimumgrlversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GenerateRequiredSchemas: GenerateRequiredSchemas::<Identity, Impl, OFFSET>,
GetOriginatorID: GetOriginatorID::<Identity, Impl, OFFSET>,
GetMinimumGRLVersion: GetMinimumGRLVersion::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFOutputPolicy as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFOutputSchema_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFOutputSchema {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFOutputSchema_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputSchema_Impl, const OFFSET: isize>() -> IMFOutputSchema_Vtbl {
unsafe extern "system" fn GetSchemaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputSchema_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidschematype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSchemaType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidschematype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetConfigurationData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputSchema_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwval: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetConfigurationData() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOriginatorID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputSchema_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidoriginatorid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOriginatorID() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguidoriginatorid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetSchemaType: GetSchemaType::<Identity, Impl, OFFSET>,
GetConfigurationData: GetConfigurationData::<Identity, Impl, OFFSET>,
GetOriginatorID: GetOriginatorID::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFOutputSchema as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFOutputTrustAuthority_Impl: Sized {
fn GetAction(&self) -> ::windows::core::Result<MFPOLICYMANAGER_ACTION>;
fn SetPolicy(&self, pppolicy: *const ::core::option::Option<IMFOutputPolicy>, npolicy: u32, ppbticket: *mut *mut u8, pcbticket: *mut u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFOutputTrustAuthority {}
impl IMFOutputTrustAuthority_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputTrustAuthority_Impl, const OFFSET: isize>() -> IMFOutputTrustAuthority_Vtbl {
unsafe extern "system" fn GetAction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFOutputTrustAuthority_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, paction: *mut MFPOLICYMANAGER_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAction() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(paction, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetPolicy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPolicy(::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, Impl, OFFSET>,
SetPolicy: SetPolicy::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFOutputTrustAuthority as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFPMPClient_Impl: Sized {
fn SetPMPHost(&self, ppmphost: ::core::option::Option<&IMFPMPHost>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFPMPClient {}
impl IMFPMPClient_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPClient_Impl, const OFFSET: isize>() -> IMFPMPClient_Vtbl {
unsafe extern "system" fn SetPMPHost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmphost: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPMPHost(::windows::core::from_raw_borrowed(&ppmphost)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetPMPHost: SetPMPHost::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMPClient as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFPMPClientApp_Impl: Sized {
fn SetPMPHost(&self, ppmphost: ::core::option::Option<&IMFPMPHostApp>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFPMPClientApp {}
impl IMFPMPClientApp_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPClientApp_Impl, const OFFSET: isize>() -> IMFPMPClientApp_Vtbl {
unsafe extern "system" fn SetPMPHost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPClientApp_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmphost: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPMPHost(::windows::core::from_raw_borrowed(&ppmphost)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetPMPHost: SetPMPHost::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMPClientApp as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_System_Com\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub trait IMFPMPHost_Impl: Sized {
fn LockProcess(&self) -> ::windows::core::Result<()>;
fn UnlockProcess(&self) -> ::windows::core::Result<()>;
fn CreateObjectByCLSID(&self, clsid: *const ::windows::core::GUID, pstream: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFPMPHost {}
#[cfg(feature = "Win32_System_Com")]
impl IMFPMPHost_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPHost_Impl, const OFFSET: isize>() -> IMFPMPHost_Vtbl {
unsafe extern "system" fn LockProcess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPHost_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockProcess().into()
}
unsafe extern "system" fn UnlockProcess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPHost_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockProcess().into()
}
unsafe extern "system" fn CreateObjectByCLSID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateObjectByCLSID(::core::mem::transmute_copy(&clsid), ::windows::core::from_raw_borrowed(&pstream), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LockProcess: LockProcess::<Identity, Impl, OFFSET>,
UnlockProcess: UnlockProcess::<Identity, Impl, OFFSET>,
CreateObjectByCLSID: CreateObjectByCLSID::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMPHost as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_System_Com\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_System_Com")]
pub trait IMFPMPHostApp_Impl: Sized {
fn LockProcess(&self) -> ::windows::core::Result<()>;
fn UnlockProcess(&self) -> ::windows::core::Result<()>;
fn ActivateClassById(&self, id: &::windows::core::PCWSTR, pstream: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFPMPHostApp {}
#[cfg(feature = "Win32_System_Com")]
impl IMFPMPHostApp_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPHostApp_Impl, const OFFSET: isize>() -> IMFPMPHostApp_Vtbl {
unsafe extern "system" fn LockProcess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPHostApp_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockProcess().into()
}
unsafe extern "system" fn UnlockProcess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPHostApp_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockProcess().into()
}
unsafe extern "system" fn ActivateClassById<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ActivateClassById(::core::mem::transmute(&id), ::windows::core::from_raw_borrowed(&pstream), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LockProcess: LockProcess::<Identity, Impl, OFFSET>,
UnlockProcess: UnlockProcess::<Identity, Impl, OFFSET>,
ActivateClassById: ActivateClassById::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMPHostApp as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFPMPServer_Impl: Sized {
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 ::windows::core::RuntimeName for IMFPMPServer {}
impl IMFPMPServer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPServer_Impl, const OFFSET: isize>() -> IMFPMPServer_Vtbl {
unsafe extern "system" fn LockProcess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPServer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LockProcess().into()
}
unsafe extern "system" fn UnlockProcess<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMPServer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnlockProcess().into()
}
unsafe extern "system" fn CreateObjectByCLSID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateObjectByCLSID(::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, Impl, OFFSET>,
UnlockProcess: UnlockProcess::<Identity, Impl, OFFSET>,
CreateObjectByCLSID: CreateObjectByCLSID::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMPServer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub trait IMFPMediaItem_Impl: Sized {
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 super::super::Foundation::BOOL, pfselected: *mut super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn HasAudio(&self, pfhasaudio: *mut super::super::Foundation::BOOL, pfselected: *mut super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn IsProtected(&self) -> ::windows::core::Result<super::super::Foundation::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<super::super::Foundation::BOOL>;
fn SetStreamSelection(&self, dwstreamindex: u32, fenabled: super::super::Foundation::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: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn GetMetadata(&self) -> ::windows::core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))]
impl ::windows::core::RuntimeName for IMFPMediaItem {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))]
impl IMFPMediaItem_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>() -> IMFPMediaItem_Vtbl {
unsafe extern "system" fn GetMediaPlayer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediaplayer: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaPlayer() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediaplayer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppwszurl: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetURL() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppwszurl, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppiunknown: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetObject() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppiunknown, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetUserData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwuserdata: *mut usize) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetUserData() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwuserdata, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetUserData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwuserdata: usize) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUserData(::core::mem::transmute_copy(&dwuserdata)).into()
}
unsafe extern "system" fn GetStartStopPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStartStopPosition(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStartStopPosition(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfhasvideo: *mut super::super::Foundation::BOOL, pfselected: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasVideo(::core::mem::transmute_copy(&pfhasvideo), ::core::mem::transmute_copy(&pfselected)).into()
}
unsafe extern "system" fn HasAudio<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfhasaudio: *mut super::super::Foundation::BOOL, pfselected: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasAudio(::core::mem::transmute_copy(&pfhasaudio), ::core::mem::transmute_copy(&pfselected)).into()
}
unsafe extern "system" fn IsProtected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfprotected: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsProtected() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfprotected, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDuration(::core::mem::transmute_copy(&guidpositiontype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvdurationvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetNumberOfStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwstreamcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNumberOfStreams() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pfenabled: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamSelection(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfenabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStreamSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, fenabled: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamSelection(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&fenabled)).into()
}
unsafe extern "system" fn GetStreamAttribute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamAttribute(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&guidmfattribute)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPresentationAttribute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPresentationAttribute(::core::mem::transmute_copy(&guidmfattribute)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCharacteristics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcharacteristics: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCharacteristics() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcharacteristics, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStreamSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pmediasink: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamSink(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&pmediasink)).into()
}
unsafe extern "system" fn GetMetadata<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmetadatastore: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMetadata() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmetadatastore, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetMediaPlayer: GetMediaPlayer::<Identity, Impl, OFFSET>,
GetURL: GetURL::<Identity, Impl, OFFSET>,
GetObject: GetObject::<Identity, Impl, OFFSET>,
GetUserData: GetUserData::<Identity, Impl, OFFSET>,
SetUserData: SetUserData::<Identity, Impl, OFFSET>,
GetStartStopPosition: GetStartStopPosition::<Identity, Impl, OFFSET>,
SetStartStopPosition: SetStartStopPosition::<Identity, Impl, OFFSET>,
HasVideo: HasVideo::<Identity, Impl, OFFSET>,
HasAudio: HasAudio::<Identity, Impl, OFFSET>,
IsProtected: IsProtected::<Identity, Impl, OFFSET>,
GetDuration: GetDuration::<Identity, Impl, OFFSET>,
GetNumberOfStreams: GetNumberOfStreams::<Identity, Impl, OFFSET>,
GetStreamSelection: GetStreamSelection::<Identity, Impl, OFFSET>,
SetStreamSelection: SetStreamSelection::<Identity, Impl, OFFSET>,
GetStreamAttribute: GetStreamAttribute::<Identity, Impl, OFFSET>,
GetPresentationAttribute: GetPresentationAttribute::<Identity, Impl, OFFSET>,
GetCharacteristics: GetCharacteristics::<Identity, Impl, OFFSET>,
SetStreamSink: SetStreamSink::<Identity, Impl, OFFSET>,
GetMetadata: GetMetadata::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMediaItem as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFPMediaPlayer_Impl: Sized {
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: super::super::Foundation::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: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut ::core::option::Option<IMFPMediaItem>) -> ::windows::core::Result<()>;
fn CreateMediaItemFromObject(&self, piunknownobj: ::core::option::Option<&::windows::core::IUnknown>, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut ::core::option::Option<IMFPMediaItem>) -> ::windows::core::Result<()>;
fn SetMediaItem(&self, pimfpmediaitem: ::core::option::Option<&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<super::super::Foundation::BOOL>;
fn SetMute(&self, fmute: super::super::Foundation::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: ::core::option::Option<&::windows::core::IUnknown>, foptional: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn RemoveEffect(&self, peffect: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn RemoveAllEffects(&self) -> ::windows::core::Result<()>;
fn Shutdown(&self) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFPMediaPlayer {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFPMediaPlayer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>() -> IMFPMediaPlayer_Vtbl {
unsafe extern "system" fn Play<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Play().into()
}
unsafe extern "system" fn Pause<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Pause().into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn FrameStep<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FrameStep().into()
}
unsafe extern "system" fn SetPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPosition(::core::mem::transmute_copy(&guidpositiontype), ::core::mem::transmute_copy(&pvpositionvalue)).into()
}
unsafe extern "system" fn GetPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPosition(::core::mem::transmute_copy(&guidpositiontype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvpositionvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDuration(::core::mem::transmute_copy(&guidpositiontype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvdurationvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flrate: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRate(::core::mem::transmute_copy(&flrate)).into()
}
unsafe extern "system" fn GetRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pflrate: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRate() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflrate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSupportedRates<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fforwarddirection: super::super::Foundation::BOOL, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSupportedRates(::core::mem::transmute_copy(&fforwarddirection), ::core::mem::transmute_copy(&pflslowestrate), ::core::mem::transmute_copy(&pflfastestrate)).into()
}
unsafe extern "system" fn GetState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pestate: *mut MFP_MEDIAPLAYER_STATE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pestate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateMediaItemFromURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszurl: ::windows::core::PCWSTR, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateMediaItemFromURL(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piunknownobj: *mut ::core::ffi::c_void, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateMediaItemFromObject(::windows::core::from_raw_borrowed(&piunknownobj), ::core::mem::transmute_copy(&fsync), ::core::mem::transmute_copy(&dwuserdata), ::core::mem::transmute_copy(&ppmediaitem)).into()
}
unsafe extern "system" fn SetMediaItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pimfpmediaitem: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMediaItem(::windows::core::from_raw_borrowed(&pimfpmediaitem)).into()
}
unsafe extern "system" fn ClearMediaItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearMediaItem().into()
}
unsafe extern "system" fn GetMediaItem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppimfpmediaitem: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaItem() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppimfpmediaitem, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pflvolume: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVolume() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflvolume, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flvolume: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVolume(::core::mem::transmute_copy(&flvolume)).into()
}
unsafe extern "system" fn GetBalance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pflbalance: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBalance() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflbalance, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetBalance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flbalance: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBalance(::core::mem::transmute_copy(&flbalance)).into()
}
unsafe extern "system" fn GetMute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfmute: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMute() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfmute, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetMute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fmute: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMute(::core::mem::transmute_copy(&fmute)).into()
}
unsafe extern "system" fn GetNativeVideoSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNativeVideoSize(::core::mem::transmute_copy(&pszvideo), ::core::mem::transmute_copy(&pszarvideo)).into()
}
unsafe extern "system" fn GetIdealVideoSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetIdealVideoSize(::core::mem::transmute_copy(&pszmin), ::core::mem::transmute_copy(&pszmax)).into()
}
unsafe extern "system" fn SetVideoSourceRect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnrcsource: *const MFVideoNormalizedRect) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoSourceRect(::core::mem::transmute_copy(&pnrcsource)).into()
}
unsafe extern "system" fn GetVideoSourceRect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnrcsource: *mut MFVideoNormalizedRect) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoSourceRect() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pnrcsource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAspectRatioMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwaspectratiomode: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAspectRatioMode(::core::mem::transmute_copy(&dwaspectratiomode)).into()
}
unsafe extern "system" fn GetAspectRatioMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwaspectratiomode: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAspectRatioMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwaspectratiomode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetVideoWindow<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phwndvideo: *mut super::super::Foundation::HWND) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoWindow() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phwndvideo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn UpdateVideo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateVideo().into()
}
unsafe extern "system" fn SetBorderColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, clr: super::super::Foundation::COLORREF) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBorderColor(::core::mem::transmute_copy(&clr)).into()
}
unsafe extern "system" fn GetBorderColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pclr: *mut super::super::Foundation::COLORREF) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBorderColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pclr, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InsertEffect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, peffect: *mut ::core::ffi::c_void, foptional: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InsertEffect(::windows::core::from_raw_borrowed(&peffect), ::core::mem::transmute_copy(&foptional)).into()
}
unsafe extern "system" fn RemoveEffect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, peffect: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveEffect(::windows::core::from_raw_borrowed(&peffect)).into()
}
unsafe extern "system" fn RemoveAllEffects<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllEffects().into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Play: Play::<Identity, Impl, OFFSET>,
Pause: Pause::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
FrameStep: FrameStep::<Identity, Impl, OFFSET>,
SetPosition: SetPosition::<Identity, Impl, OFFSET>,
GetPosition: GetPosition::<Identity, Impl, OFFSET>,
GetDuration: GetDuration::<Identity, Impl, OFFSET>,
SetRate: SetRate::<Identity, Impl, OFFSET>,
GetRate: GetRate::<Identity, Impl, OFFSET>,
GetSupportedRates: GetSupportedRates::<Identity, Impl, OFFSET>,
GetState: GetState::<Identity, Impl, OFFSET>,
CreateMediaItemFromURL: CreateMediaItemFromURL::<Identity, Impl, OFFSET>,
CreateMediaItemFromObject: CreateMediaItemFromObject::<Identity, Impl, OFFSET>,
SetMediaItem: SetMediaItem::<Identity, Impl, OFFSET>,
ClearMediaItem: ClearMediaItem::<Identity, Impl, OFFSET>,
GetMediaItem: GetMediaItem::<Identity, Impl, OFFSET>,
GetVolume: GetVolume::<Identity, Impl, OFFSET>,
SetVolume: SetVolume::<Identity, Impl, OFFSET>,
GetBalance: GetBalance::<Identity, Impl, OFFSET>,
SetBalance: SetBalance::<Identity, Impl, OFFSET>,
GetMute: GetMute::<Identity, Impl, OFFSET>,
SetMute: SetMute::<Identity, Impl, OFFSET>,
GetNativeVideoSize: GetNativeVideoSize::<Identity, Impl, OFFSET>,
GetIdealVideoSize: GetIdealVideoSize::<Identity, Impl, OFFSET>,
SetVideoSourceRect: SetVideoSourceRect::<Identity, Impl, OFFSET>,
GetVideoSourceRect: GetVideoSourceRect::<Identity, Impl, OFFSET>,
SetAspectRatioMode: SetAspectRatioMode::<Identity, Impl, OFFSET>,
GetAspectRatioMode: GetAspectRatioMode::<Identity, Impl, OFFSET>,
GetVideoWindow: GetVideoWindow::<Identity, Impl, OFFSET>,
UpdateVideo: UpdateVideo::<Identity, Impl, OFFSET>,
SetBorderColor: SetBorderColor::<Identity, Impl, OFFSET>,
GetBorderColor: GetBorderColor::<Identity, Impl, OFFSET>,
InsertEffect: InsertEffect::<Identity, Impl, OFFSET>,
RemoveEffect: RemoveEffect::<Identity, Impl, OFFSET>,
RemoveAllEffects: RemoveAllEffects::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMediaPlayer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFPMediaPlayerCallback_Impl: Sized {
fn OnMediaPlayerEvent(&self, peventheader: *const MFP_EVENT_HEADER);
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::windows::core::RuntimeName for IMFPMediaPlayerCallback {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFPMediaPlayerCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayerCallback_Impl, const OFFSET: isize>() -> IMFPMediaPlayerCallback_Vtbl {
unsafe extern "system" fn OnMediaPlayerEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPMediaPlayerCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, peventheader: *const MFP_EVENT_HEADER) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnMediaPlayerEvent(::core::mem::transmute_copy(&peventheader))
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnMediaPlayerEvent: OnMediaPlayerEvent::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPMediaPlayerCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFPluginControl_Impl: Sized {
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: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFPluginControl {}
#[cfg(feature = "Win32_Foundation")]
impl IMFPluginControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPluginControl_Impl, const OFFSET: isize>() -> IMFPluginControl_Vtbl {
unsafe extern "system" fn GetPreferredClsid<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPreferredClsid(::core::mem::transmute_copy(&plugintype), ::core::mem::transmute(&selector)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(clsid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPreferredClsidByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPreferredClsidByIndex(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPreferredClsid(::core::mem::transmute_copy(&plugintype), ::core::mem::transmute(&selector), ::core::mem::transmute_copy(&clsid)).into()
}
unsafe extern "system" fn IsDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plugintype: u32, clsid: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsDisabled(::core::mem::transmute_copy(&plugintype), ::core::mem::transmute_copy(&clsid)).into()
}
unsafe extern "system" fn GetDisabledByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plugintype: u32, index: u32, clsid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDisabledByIndex(::core::mem::transmute_copy(&plugintype), ::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(clsid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plugintype: u32, clsid: *const ::windows::core::GUID, disabled: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDisabled(::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, Impl, OFFSET>,
GetPreferredClsidByIndex: GetPreferredClsidByIndex::<Identity, Impl, OFFSET>,
SetPreferredClsid: SetPreferredClsid::<Identity, Impl, OFFSET>,
IsDisabled: IsDisabled::<Identity, Impl, OFFSET>,
GetDisabledByIndex: GetDisabledByIndex::<Identity, Impl, OFFSET>,
SetDisabled: SetDisabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPluginControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFPluginControl2_Impl: Sized + IMFPluginControl_Impl {
fn SetPolicy(&self, policy: MF_PLUGIN_CONTROL_POLICY) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFPluginControl2 {}
#[cfg(feature = "Win32_Foundation")]
impl IMFPluginControl2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPluginControl2_Impl, const OFFSET: isize>() -> IMFPluginControl2_Vtbl {
unsafe extern "system" fn SetPolicy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPluginControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, policy: MF_PLUGIN_CONTROL_POLICY) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPolicy(::core::mem::transmute_copy(&policy)).into()
}
Self { base__: IMFPluginControl_Vtbl::new::<Identity, Impl, OFFSET>(), SetPolicy: SetPolicy::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPluginControl2 as ::windows::core::ComInterface>::IID || iid == &<IMFPluginControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFPresentationClock_Impl: Sized + IMFClock_Impl {
fn SetTimeSource(&self, ptimesource: ::core::option::Option<&IMFPresentationTimeSource>) -> ::windows::core::Result<()>;
fn GetTimeSource(&self) -> ::windows::core::Result<IMFPresentationTimeSource>;
fn GetTime(&self) -> ::windows::core::Result<i64>;
fn AddClockStateSink(&self, pstatesink: ::core::option::Option<&IMFClockStateSink>) -> ::windows::core::Result<()>;
fn RemoveClockStateSink(&self, pstatesink: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFPresentationClock {}
impl IMFPresentationClock_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>() -> IMFPresentationClock_Vtbl {
unsafe extern "system" fn SetTimeSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptimesource: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTimeSource(::windows::core::from_raw_borrowed(&ptimesource)).into()
}
unsafe extern "system" fn GetTimeSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pptimesource: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTimeSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptimesource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phnsclocktime: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTime() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phnsclocktime, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddClockStateSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstatesink: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddClockStateSink(::windows::core::from_raw_borrowed(&pstatesink)).into()
}
unsafe extern "system" fn RemoveClockStateSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstatesink: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveClockStateSink(::windows::core::from_raw_borrowed(&pstatesink)).into()
}
unsafe extern "system" fn Start<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, llclockstartoffset: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start(::core::mem::transmute_copy(&llclockstartoffset)).into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn Pause<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Pause().into()
}
Self {
base__: IMFClock_Vtbl::new::<Identity, Impl, OFFSET>(),
SetTimeSource: SetTimeSource::<Identity, Impl, OFFSET>,
GetTimeSource: GetTimeSource::<Identity, Impl, OFFSET>,
GetTime: GetTime::<Identity, Impl, OFFSET>,
AddClockStateSink: AddClockStateSink::<Identity, Impl, OFFSET>,
RemoveClockStateSink: RemoveClockStateSink::<Identity, Impl, OFFSET>,
Start: Start::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
Pause: Pause::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPresentationClock as ::windows::core::ComInterface>::IID || iid == &<IMFClock as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFPresentationDescriptor_Impl: Sized + IMFAttributes_Impl {
fn GetStreamDescriptorCount(&self) -> ::windows::core::Result<u32>;
fn GetStreamDescriptorByIndex(&self, dwindex: u32, pfselected: *mut super::super::Foundation::BOOL, ppdescriptor: *mut ::core::option::Option<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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFPresentationDescriptor {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFPresentationDescriptor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationDescriptor_Impl, const OFFSET: isize>() -> IMFPresentationDescriptor_Vtbl {
unsafe extern "system" fn GetStreamDescriptorCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwdescriptorcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamDescriptorCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwdescriptorcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamDescriptorByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, pfselected: *mut super::super::Foundation::BOOL, ppdescriptor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamDescriptorByIndex(::core::mem::transmute_copy(&dwindex), ::core::mem::transmute_copy(&pfselected), ::core::mem::transmute_copy(&ppdescriptor)).into()
}
unsafe extern "system" fn SelectStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwdescriptorindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SelectStream(::core::mem::transmute_copy(&dwdescriptorindex)).into()
}
unsafe extern "system" fn DeselectStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwdescriptorindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeselectStream(::core::mem::transmute_copy(&dwdescriptorindex)).into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pppresentationdescriptor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pppresentationdescriptor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetStreamDescriptorCount: GetStreamDescriptorCount::<Identity, Impl, OFFSET>,
GetStreamDescriptorByIndex: GetStreamDescriptorByIndex::<Identity, Impl, OFFSET>,
SelectStream: SelectStream::<Identity, Impl, OFFSET>,
DeselectStream: DeselectStream::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPresentationDescriptor as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFPresentationTimeSource_Impl: Sized + IMFClock_Impl {
fn GetUnderlyingClock(&self) -> ::windows::core::Result<IMFClock>;
}
impl ::windows::core::RuntimeName for IMFPresentationTimeSource {}
impl IMFPresentationTimeSource_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationTimeSource_Impl, const OFFSET: isize>() -> IMFPresentationTimeSource_Vtbl {
unsafe extern "system" fn GetUnderlyingClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFPresentationTimeSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppclock: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetUnderlyingClock() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppclock, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: IMFClock_Vtbl::new::<Identity, Impl, OFFSET>(), GetUnderlyingClock: GetUnderlyingClock::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFPresentationTimeSource as ::windows::core::ComInterface>::IID || iid == &<IMFClock as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFProtectedEnvironmentAccess_Impl: Sized {
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 ::windows::core::RuntimeName for IMFProtectedEnvironmentAccess {}
impl IMFProtectedEnvironmentAccess_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFProtectedEnvironmentAccess_Impl, const OFFSET: isize>() -> IMFProtectedEnvironmentAccess_Vtbl {
unsafe extern "system" fn Call<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFProtectedEnvironmentAccess_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, inputlength: u32, input: *const u8, outputlength: u32, output: *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Call(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFProtectedEnvironmentAccess_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, outputlength: *mut u32, output: *mut *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ReadGRL(::core::mem::transmute_copy(&outputlength), ::core::mem::transmute_copy(&output)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Call: Call::<Identity, Impl, OFFSET>,
ReadGRL: ReadGRL::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFProtectedEnvironmentAccess as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFQualityAdvise_Impl: Sized {
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 ::windows::core::RuntimeName for IMFQualityAdvise {}
impl IMFQualityAdvise_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise_Impl, const OFFSET: isize>() -> IMFQualityAdvise_Vtbl {
unsafe extern "system" fn SetDropMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, edropmode: MF_QUALITY_DROP_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDropMode(::core::mem::transmute_copy(&edropmode)).into()
}
unsafe extern "system" fn SetQualityLevel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, equalitylevel: MF_QUALITY_LEVEL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetQualityLevel(::core::mem::transmute_copy(&equalitylevel)).into()
}
unsafe extern "system" fn GetDropMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pedropmode: *mut MF_QUALITY_DROP_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDropMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pedropmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetQualityLevel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pequalitylevel: *mut MF_QUALITY_LEVEL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetQualityLevel() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pequalitylevel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DropTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnsamounttodrop: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DropTime(::core::mem::transmute_copy(&hnsamounttodrop)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDropMode: SetDropMode::<Identity, Impl, OFFSET>,
SetQualityLevel: SetQualityLevel::<Identity, Impl, OFFSET>,
GetDropMode: GetDropMode::<Identity, Impl, OFFSET>,
GetQualityLevel: GetQualityLevel::<Identity, Impl, OFFSET>,
DropTime: DropTime::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFQualityAdvise as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFQualityAdvise2_Impl: Sized + IMFQualityAdvise_Impl {
fn NotifyQualityEvent(&self, pevent: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IMFQualityAdvise2 {}
impl IMFQualityAdvise2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise2_Impl, const OFFSET: isize>() -> IMFQualityAdvise2_Vtbl {
unsafe extern "system" fn NotifyQualityEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdvise2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pevent: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.NotifyQualityEvent(::windows::core::from_raw_borrowed(&pevent)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: IMFQualityAdvise_Vtbl::new::<Identity, Impl, OFFSET>(), NotifyQualityEvent: NotifyQualityEvent::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFQualityAdvise2 as ::windows::core::ComInterface>::IID || iid == &<IMFQualityAdvise as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFQualityAdviseLimits_Impl: Sized {
fn GetMaximumDropMode(&self) -> ::windows::core::Result<MF_QUALITY_DROP_MODE>;
fn GetMinimumQualityLevel(&self) -> ::windows::core::Result<MF_QUALITY_LEVEL>;
}
impl ::windows::core::RuntimeName for IMFQualityAdviseLimits {}
impl IMFQualityAdviseLimits_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdviseLimits_Impl, const OFFSET: isize>() -> IMFQualityAdviseLimits_Vtbl {
unsafe extern "system" fn GetMaximumDropMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdviseLimits_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pedropmode: *mut MF_QUALITY_DROP_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMaximumDropMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pedropmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMinimumQualityLevel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityAdviseLimits_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pequalitylevel: *mut MF_QUALITY_LEVEL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMinimumQualityLevel() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pequalitylevel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetMaximumDropMode: GetMaximumDropMode::<Identity, Impl, OFFSET>,
GetMinimumQualityLevel: GetMinimumQualityLevel::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFQualityAdviseLimits as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFQualityManager_Impl: Sized {
fn NotifyTopology(&self, ptopology: ::core::option::Option<&IMFTopology>) -> ::windows::core::Result<()>;
fn NotifyPresentationClock(&self, pclock: ::core::option::Option<&IMFPresentationClock>) -> ::windows::core::Result<()>;
fn NotifyProcessInput(&self, pnode: ::core::option::Option<&IMFTopologyNode>, linputindex: i32, psample: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
fn NotifyProcessOutput(&self, pnode: ::core::option::Option<&IMFTopologyNode>, loutputindex: i32, psample: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
fn NotifyQualityEvent(&self, pobject: ::core::option::Option<&::windows::core::IUnknown>, pevent: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
fn Shutdown(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFQualityManager {}
impl IMFQualityManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityManager_Impl, const OFFSET: isize>() -> IMFQualityManager_Vtbl {
unsafe extern "system" fn NotifyTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptopology: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyTopology(::windows::core::from_raw_borrowed(&ptopology)).into()
}
unsafe extern "system" fn NotifyPresentationClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pclock: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyPresentationClock(::windows::core::from_raw_borrowed(&pclock)).into()
}
unsafe extern "system" fn NotifyProcessInput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyProcessInput(::windows::core::from_raw_borrowed(&pnode), ::core::mem::transmute_copy(&linputindex), ::windows::core::from_raw_borrowed(&psample)).into()
}
unsafe extern "system" fn NotifyProcessOutput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyProcessOutput(::windows::core::from_raw_borrowed(&pnode), ::core::mem::transmute_copy(&loutputindex), ::windows::core::from_raw_borrowed(&psample)).into()
}
unsafe extern "system" fn NotifyQualityEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyQualityEvent(::windows::core::from_raw_borrowed(&pobject), ::windows::core::from_raw_borrowed(&pevent)).into()
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
NotifyTopology: NotifyTopology::<Identity, Impl, OFFSET>,
NotifyPresentationClock: NotifyPresentationClock::<Identity, Impl, OFFSET>,
NotifyProcessInput: NotifyProcessInput::<Identity, Impl, OFFSET>,
NotifyProcessOutput: NotifyProcessOutput::<Identity, Impl, OFFSET>,
NotifyQualityEvent: NotifyQualityEvent::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFQualityManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFRateControl_Impl: Sized {
fn SetRate(&self, fthin: super::super::Foundation::BOOL, flrate: f32) -> ::windows::core::Result<()>;
fn GetRate(&self, pfthin: *mut super::super::Foundation::BOOL, pflrate: *mut f32) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFRateControl {}
#[cfg(feature = "Win32_Foundation")]
impl IMFRateControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateControl_Impl, const OFFSET: isize>() -> IMFRateControl_Vtbl {
unsafe extern "system" fn SetRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fthin: super::super::Foundation::BOOL, flrate: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRate(::core::mem::transmute_copy(&fthin), ::core::mem::transmute_copy(&flrate)).into()
}
unsafe extern "system" fn GetRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfthin: *mut super::super::Foundation::BOOL, pflrate: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetRate(::core::mem::transmute_copy(&pfthin), ::core::mem::transmute_copy(&pflrate)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetRate: SetRate::<Identity, Impl, OFFSET>,
GetRate: GetRate::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRateControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFRateSupport_Impl: Sized {
fn GetSlowestRate(&self, edirection: MFRATE_DIRECTION, fthin: super::super::Foundation::BOOL) -> ::windows::core::Result<f32>;
fn GetFastestRate(&self, edirection: MFRATE_DIRECTION, fthin: super::super::Foundation::BOOL) -> ::windows::core::Result<f32>;
fn IsRateSupported(&self, fthin: super::super::Foundation::BOOL, flrate: f32, pflnearestsupportedrate: *mut f32) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFRateSupport {}
#[cfg(feature = "Win32_Foundation")]
impl IMFRateSupport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateSupport_Impl, const OFFSET: isize>() -> IMFRateSupport_Vtbl {
unsafe extern "system" fn GetSlowestRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, edirection: MFRATE_DIRECTION, fthin: super::super::Foundation::BOOL, pflrate: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSlowestRate(::core::mem::transmute_copy(&edirection), ::core::mem::transmute_copy(&fthin)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflrate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFastestRate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, edirection: MFRATE_DIRECTION, fthin: super::super::Foundation::BOOL, pflrate: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFastestRate(::core::mem::transmute_copy(&edirection), ::core::mem::transmute_copy(&fthin)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflrate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsRateSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRateSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fthin: super::super::Foundation::BOOL, flrate: f32, pflnearestsupportedrate: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsRateSupported(::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, Impl, OFFSET>,
GetFastestRate: GetFastestRate::<Identity, Impl, OFFSET>,
IsRateSupported: IsRateSupported::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRateSupport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFReadWriteClassFactory_Impl: Sized {
fn CreateInstanceFromURL(&self, clsid: *const ::windows::core::GUID, pwszurl: &::windows::core::PCWSTR, pattributes: ::core::option::Option<&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: ::core::option::Option<&::windows::core::IUnknown>, pattributes: ::core::option::Option<&IMFAttributes>, riid: *const ::windows::core::GUID, ppvobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFReadWriteClassFactory {}
impl IMFReadWriteClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFReadWriteClassFactory_Impl, const OFFSET: isize>() -> IMFReadWriteClassFactory_Vtbl {
unsafe extern "system" fn CreateInstanceFromURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateInstanceFromURL(::core::mem::transmute_copy(&clsid), ::core::mem::transmute(&pwszurl), ::windows::core::from_raw_borrowed(&pattributes), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvobject)).into()
}
unsafe extern "system" fn CreateInstanceFromObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateInstanceFromObject(::core::mem::transmute_copy(&clsid), ::windows::core::from_raw_borrowed(&punkobject), ::windows::core::from_raw_borrowed(&pattributes), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppvobject)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateInstanceFromURL: CreateInstanceFromURL::<Identity, Impl, OFFSET>,
CreateInstanceFromObject: CreateInstanceFromObject::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFReadWriteClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRealTimeClient_Impl: Sized {
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 ::windows::core::RuntimeName for IMFRealTimeClient {}
impl IMFRealTimeClient_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClient_Impl, const OFFSET: isize>() -> IMFRealTimeClient_Vtbl {
unsafe extern "system" fn RegisterThreads<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwtaskindex: u32, wszclass: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterThreads(::core::mem::transmute_copy(&dwtaskindex), ::core::mem::transmute(&wszclass)).into()
}
unsafe extern "system" fn UnregisterThreads<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnregisterThreads().into()
}
unsafe extern "system" fn SetWorkQueue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwworkqueueid: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetWorkQueue(::core::mem::transmute_copy(&dwworkqueueid)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RegisterThreads: RegisterThreads::<Identity, Impl, OFFSET>,
UnregisterThreads: UnregisterThreads::<Identity, Impl, OFFSET>,
SetWorkQueue: SetWorkQueue::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRealTimeClient as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRealTimeClientEx_Impl: Sized {
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 ::windows::core::RuntimeName for IMFRealTimeClientEx {}
impl IMFRealTimeClientEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClientEx_Impl, const OFFSET: isize>() -> IMFRealTimeClientEx_Vtbl {
unsafe extern "system" fn RegisterThreadsEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClientEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwtaskindex: *mut u32, wszclassname: ::windows::core::PCWSTR, lbasepriority: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterThreadsEx(::core::mem::transmute_copy(&pdwtaskindex), ::core::mem::transmute(&wszclassname), ::core::mem::transmute_copy(&lbasepriority)).into()
}
unsafe extern "system" fn UnregisterThreads<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClientEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UnregisterThreads().into()
}
unsafe extern "system" fn SetWorkQueueEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRealTimeClientEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmultithreadedworkqueueid: u32, lworkitembasepriority: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetWorkQueueEx(::core::mem::transmute_copy(&dwmultithreadedworkqueueid), ::core::mem::transmute_copy(&lworkitembasepriority)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RegisterThreadsEx: RegisterThreadsEx::<Identity, Impl, OFFSET>,
UnregisterThreads: UnregisterThreads::<Identity, Impl, OFFSET>,
SetWorkQueueEx: SetWorkQueueEx::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRealTimeClientEx as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRelativePanelReport_Impl: Sized {
fn GetRelativePanel(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IMFRelativePanelReport {}
impl IMFRelativePanelReport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRelativePanelReport_Impl, const OFFSET: isize>() -> IMFRelativePanelReport_Vtbl {
unsafe extern "system" fn GetRelativePanel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRelativePanelReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, panel: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRelativePanel() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(panel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetRelativePanel: GetRelativePanel::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRelativePanelReport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRelativePanelWatcher_Impl: Sized + IMFShutdown_Impl {
fn BeginGetReport(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndGetReport(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<IMFRelativePanelReport>;
fn GetReport(&self) -> ::windows::core::Result<IMFRelativePanelReport>;
}
impl ::windows::core::RuntimeName for IMFRelativePanelWatcher {}
impl IMFRelativePanelWatcher_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRelativePanelWatcher_Impl, const OFFSET: isize>() -> IMFRelativePanelWatcher_Vtbl {
unsafe extern "system" fn BeginGetReport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginGetReport(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndGetReport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndGetReport(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pprelativepanelreport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetReport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRelativePanelWatcher_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprelativepanelreport: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetReport() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pprelativepanelreport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFShutdown_Vtbl::new::<Identity, Impl, OFFSET>(),
BeginGetReport: BeginGetReport::<Identity, Impl, OFFSET>,
EndGetReport: EndGetReport::<Identity, Impl, OFFSET>,
GetReport: GetReport::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRelativePanelWatcher as ::windows::core::ComInterface>::IID || iid == &<IMFShutdown as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRemoteAsyncCallback_Impl: Sized {
fn Invoke(&self, hr: ::windows::core::HRESULT, premoteresult: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFRemoteAsyncCallback {}
impl IMFRemoteAsyncCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRemoteAsyncCallback_Impl, const OFFSET: isize>() -> IMFRemoteAsyncCallback_Vtbl {
unsafe extern "system" fn Invoke<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRemoteAsyncCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hr: ::windows::core::HRESULT, premoteresult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(::core::mem::transmute_copy(&hr), ::windows::core::from_raw_borrowed(&premoteresult)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Invoke: Invoke::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRemoteAsyncCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRemoteDesktopPlugin_Impl: Sized {
fn UpdateTopology(&self, ptopology: ::core::option::Option<&IMFTopology>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFRemoteDesktopPlugin {}
impl IMFRemoteDesktopPlugin_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRemoteDesktopPlugin_Impl, const OFFSET: isize>() -> IMFRemoteDesktopPlugin_Vtbl {
unsafe extern "system" fn UpdateTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRemoteDesktopPlugin_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptopology: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateTopology(::windows::core::from_raw_borrowed(&ptopology)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), UpdateTopology: UpdateTopology::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRemoteDesktopPlugin as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFRemoteProxy_Impl: Sized {
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 ::windows::core::RuntimeName for IMFRemoteProxy {}
impl IMFRemoteProxy_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFRemoteProxy_Impl, const OFFSET: isize>() -> IMFRemoteProxy_Vtbl {
unsafe extern "system" fn GetRemoteObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetRemoteObject(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
unsafe extern "system" fn GetRemoteHost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetRemoteHost(::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetRemoteObject: GetRemoteObject::<Identity, Impl, OFFSET>,
GetRemoteHost: GetRemoteHost::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFRemoteProxy as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSAMIStyle_Impl: Sized {
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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSAMIStyle {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSAMIStyle_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSAMIStyle_Impl, const OFFSET: isize>() -> IMFSAMIStyle_Vtbl {
unsafe extern "system" fn GetStyleCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStyleCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStyles<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppropvarstylearray: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStyles() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppropvarstylearray, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSelectedStyle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszstyle: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSelectedStyle(::core::mem::transmute(&pwszstyle)).into()
}
unsafe extern "system" fn GetSelectedStyle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppwszstyle: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSelectedStyle() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppwszstyle, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStyleCount: GetStyleCount::<Identity, Impl, OFFSET>,
GetStyles: GetStyles::<Identity, Impl, OFFSET>,
SetSelectedStyle: SetSelectedStyle::<Identity, Impl, OFFSET>,
GetSelectedStyle: GetSelectedStyle::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSAMIStyle as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFSSLCertificateManager_Impl: Sized {
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: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndGetClientCertificate(&self, presult: ::core::option::Option<&IMFAsyncResult>, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> ::windows::core::Result<()>;
fn GetCertificatePolicy(&self, pszurl: &::windows::core::PCWSTR, pfoverrideautomaticcheck: *mut super::super::Foundation::BOOL, pfclientcertificateavailable: *mut super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn OnServerCertificate(&self, pszurl: &::windows::core::PCWSTR, pbdata: *const u8, cbdata: u32) -> ::windows::core::Result<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFSSLCertificateManager {}
#[cfg(feature = "Win32_Foundation")]
impl IMFSSLCertificateManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSSLCertificateManager_Impl, const OFFSET: isize>() -> IMFSSLCertificateManager_Vtbl {
unsafe extern "system" fn GetClientCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetClientCertificate(::core::mem::transmute(&pszurl), ::core::mem::transmute_copy(&ppbdata), ::core::mem::transmute_copy(&pcbdata)).into()
}
unsafe extern "system" fn BeginGetClientCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginGetClientCertificate(::core::mem::transmute(&pszurl), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndGetClientCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndGetClientCertificate(::windows::core::from_raw_borrowed(&presult), ::core::mem::transmute_copy(&ppbdata), ::core::mem::transmute_copy(&pcbdata)).into()
}
unsafe extern "system" fn GetCertificatePolicy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszurl: ::windows::core::PCWSTR, pfoverrideautomaticcheck: *mut super::super::Foundation::BOOL, pfclientcertificateavailable: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCertificatePolicy(::core::mem::transmute(&pszurl), ::core::mem::transmute_copy(&pfoverrideautomaticcheck), ::core::mem::transmute_copy(&pfclientcertificateavailable)).into()
}
unsafe extern "system" fn OnServerCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszurl: ::windows::core::PCWSTR, pbdata: *const u8, cbdata: u32, pfisgood: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.OnServerCertificate(::core::mem::transmute(&pszurl), ::core::mem::transmute_copy(&pbdata), ::core::mem::transmute_copy(&cbdata)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfisgood, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetClientCertificate: GetClientCertificate::<Identity, Impl, OFFSET>,
BeginGetClientCertificate: BeginGetClientCertificate::<Identity, Impl, OFFSET>,
EndGetClientCertificate: EndGetClientCertificate::<Identity, Impl, OFFSET>,
GetCertificatePolicy: GetCertificatePolicy::<Identity, Impl, OFFSET>,
OnServerCertificate: OnServerCertificate::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSSLCertificateManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSample_Impl: Sized + 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: ::core::option::Option<&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: ::core::option::Option<&IMFMediaBuffer>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSample {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSample_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>() -> IMFSample_Vtbl {
unsafe extern "system" fn GetSampleFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwsampleflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSampleFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwsampleflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSampleFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwsampleflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSampleFlags(::core::mem::transmute_copy(&dwsampleflags)).into()
}
unsafe extern "system" fn GetSampleTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phnssampletime: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSampleTime() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phnssampletime, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSampleTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssampletime: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSampleTime(::core::mem::transmute_copy(&hnssampletime)).into()
}
unsafe extern "system" fn GetSampleDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phnssampleduration: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSampleDuration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phnssampleduration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSampleDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnssampleduration: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSampleDuration(::core::mem::transmute_copy(&hnssampleduration)).into()
}
unsafe extern "system" fn GetBufferCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwbuffercount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBufferCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwbuffercount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBufferByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppbuffer: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBufferByIndex(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppbuffer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ConvertToContiguousBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppbuffer: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ConvertToContiguousBuffer() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppbuffer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbuffer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddBuffer(::windows::core::from_raw_borrowed(&pbuffer)).into()
}
unsafe extern "system" fn RemoveBufferByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveBufferByIndex(::core::mem::transmute_copy(&dwindex)).into()
}
unsafe extern "system" fn RemoveAllBuffers<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllBuffers().into()
}
unsafe extern "system" fn GetTotalLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcbtotallength: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTotalLength() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcbtotallength, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CopyToBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbuffer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CopyToBuffer(::windows::core::from_raw_borrowed(&pbuffer)).into()
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetSampleFlags: GetSampleFlags::<Identity, Impl, OFFSET>,
SetSampleFlags: SetSampleFlags::<Identity, Impl, OFFSET>,
GetSampleTime: GetSampleTime::<Identity, Impl, OFFSET>,
SetSampleTime: SetSampleTime::<Identity, Impl, OFFSET>,
GetSampleDuration: GetSampleDuration::<Identity, Impl, OFFSET>,
SetSampleDuration: SetSampleDuration::<Identity, Impl, OFFSET>,
GetBufferCount: GetBufferCount::<Identity, Impl, OFFSET>,
GetBufferByIndex: GetBufferByIndex::<Identity, Impl, OFFSET>,
ConvertToContiguousBuffer: ConvertToContiguousBuffer::<Identity, Impl, OFFSET>,
AddBuffer: AddBuffer::<Identity, Impl, OFFSET>,
RemoveBufferByIndex: RemoveBufferByIndex::<Identity, Impl, OFFSET>,
RemoveAllBuffers: RemoveAllBuffers::<Identity, Impl, OFFSET>,
GetTotalLength: GetTotalLength::<Identity, Impl, OFFSET>,
CopyToBuffer: CopyToBuffer::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSample as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSampleAllocatorControl_Impl: Sized {
fn SetDefaultAllocator(&self, dwoutputstreamid: u32, pallocator: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn GetAllocatorUsage(&self, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSampleAllocatorControl {}
impl IMFSampleAllocatorControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleAllocatorControl_Impl, const OFFSET: isize>() -> IMFSampleAllocatorControl_Vtbl {
unsafe extern "system" fn SetDefaultAllocator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleAllocatorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, pallocator: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultAllocator(::core::mem::transmute_copy(&dwoutputstreamid), ::windows::core::from_raw_borrowed(&pallocator)).into()
}
unsafe extern "system" fn GetAllocatorUsage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleAllocatorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAllocatorUsage(::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, Impl, OFFSET>,
GetAllocatorUsage: GetAllocatorUsage::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSampleAllocatorControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSampleGrabberSinkCallback_Impl: Sized + IMFClockStateSink_Impl {
fn OnSetPresentationClock(&self, ppresentationclock: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFSampleGrabberSinkCallback {}
impl IMFSampleGrabberSinkCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>() -> IMFSampleGrabberSinkCallback_Vtbl {
unsafe extern "system" fn OnSetPresentationClock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppresentationclock: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSetPresentationClock(::windows::core::from_raw_borrowed(&ppresentationclock)).into()
}
unsafe extern "system" fn OnProcessSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnProcessSample(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnShutdown().into()
}
Self {
base__: IMFClockStateSink_Vtbl::new::<Identity, Impl, OFFSET>(),
OnSetPresentationClock: OnSetPresentationClock::<Identity, Impl, OFFSET>,
OnProcessSample: OnProcessSample::<Identity, Impl, OFFSET>,
OnShutdown: OnShutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSampleGrabberSinkCallback as ::windows::core::ComInterface>::IID || iid == &<IMFClockStateSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSampleGrabberSinkCallback2_Impl: Sized + IMFSampleGrabberSinkCallback_Impl {
fn OnProcessSampleEx(&self, guidmajormediatype: *const ::windows::core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32, pattributes: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSampleGrabberSinkCallback2 {}
impl IMFSampleGrabberSinkCallback2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleGrabberSinkCallback2_Impl, const OFFSET: isize>() -> IMFSampleGrabberSinkCallback2_Vtbl {
unsafe extern "system" fn OnProcessSampleEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnProcessSampleEx(::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), ::windows::core::from_raw_borrowed(&pattributes)).into()
}
Self { base__: IMFSampleGrabberSinkCallback_Vtbl::new::<Identity, Impl, OFFSET>(), OnProcessSampleEx: OnProcessSampleEx::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSampleGrabberSinkCallback2 as ::windows::core::ComInterface>::IID || iid == &<IMFClockStateSink as ::windows::core::ComInterface>::IID || iid == &<IMFSampleGrabberSinkCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSampleOutputStream_Impl: Sized {
fn BeginWriteSample(&self, psample: ::core::option::Option<&IMFSample>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndWriteSample(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
fn Close(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSampleOutputStream {}
impl IMFSampleOutputStream_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleOutputStream_Impl, const OFFSET: isize>() -> IMFSampleOutputStream_Vtbl {
unsafe extern "system" fn BeginWriteSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginWriteSample(::windows::core::from_raw_borrowed(&psample), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndWriteSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleOutputStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndWriteSample(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn Close<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleOutputStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginWriteSample: BeginWriteSample::<Identity, Impl, OFFSET>,
EndWriteSample: EndWriteSample::<Identity, Impl, OFFSET>,
Close: Close::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSampleOutputStream as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSampleProtection_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSampleProtection {}
impl IMFSampleProtection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleProtection_Impl, const OFFSET: isize>() -> IMFSampleProtection_Vtbl {
unsafe extern "system" fn GetInputProtectionVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwversion: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputProtectionVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputProtectionVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwversion: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputProtectionVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProtectionCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwversion: u32, ppcert: *mut *mut u8, pcbcert: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProtectionCertificate(::core::mem::transmute_copy(&dwversion), ::core::mem::transmute_copy(&ppcert), ::core::mem::transmute_copy(&pcbcert)).into()
}
unsafe extern "system" fn InitOutputProtection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitOutputProtection(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwversion: u32, dwinputid: u32, pbseed: *const u8, cbseed: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitInputProtection(::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, Impl, OFFSET>,
GetOutputProtectionVersion: GetOutputProtectionVersion::<Identity, Impl, OFFSET>,
GetProtectionCertificate: GetProtectionCertificate::<Identity, Impl, OFFSET>,
InitOutputProtection: InitOutputProtection::<Identity, Impl, OFFSET>,
InitInputProtection: InitInputProtection::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSampleProtection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSaveJob_Impl: Sized {
fn BeginSave(&self, pstream: ::core::option::Option<&IMFByteStream>, pcallback: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndSave(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
fn CancelSave(&self) -> ::windows::core::Result<()>;
fn GetProgress(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IMFSaveJob {}
impl IMFSaveJob_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSaveJob_Impl, const OFFSET: isize>() -> IMFSaveJob_Vtbl {
unsafe extern "system" fn BeginSave<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginSave(::windows::core::from_raw_borrowed(&pstream), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndSave<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndSave(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn CancelSave<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelSave().into()
}
unsafe extern "system" fn GetProgress<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwpercentcomplete: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProgress() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwpercentcomplete, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginSave: BeginSave::<Identity, Impl, OFFSET>,
EndSave: EndSave::<Identity, Impl, OFFSET>,
CancelSave: CancelSave::<Identity, Impl, OFFSET>,
GetProgress: GetProgress::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSaveJob as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFSchemeHandler_Impl: Sized {
fn BeginCreateObject(&self, pwszurl: &::windows::core::PCWSTR, dwflags: u32, pprops: ::core::option::Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut ::core::option::Option<::windows::core::IUnknown>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndCreateObject(&self, presult: ::core::option::Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::windows::core::RuntimeName for IMFSchemeHandler {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFSchemeHandler_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSchemeHandler_Impl, const OFFSET: isize>() -> IMFSchemeHandler_Vtbl {
unsafe extern "system" fn BeginCreateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginCreateObject(::core::mem::transmute(&pwszurl), ::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pprops), ::core::mem::transmute_copy(&ppiunknowncancelcookie), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndCreateObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndCreateObject(::windows::core::from_raw_borrowed(&presult), ::core::mem::transmute_copy(&pobjecttype), ::core::mem::transmute_copy(&ppobject)).into()
}
unsafe extern "system" fn CancelObjectCreation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSchemeHandler_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piunknowncancelcookie: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelObjectCreation(::windows::core::from_raw_borrowed(&piunknowncancelcookie)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginCreateObject: BeginCreateObject::<Identity, Impl, OFFSET>,
EndCreateObject: EndCreateObject::<Identity, Impl, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSchemeHandler as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSecureBuffer_Impl: Sized {
fn GetIdentifier(&self) -> ::windows::core::Result<::windows::core::GUID>;
}
impl ::windows::core::RuntimeName for IMFSecureBuffer {}
impl IMFSecureBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSecureBuffer_Impl, const OFFSET: isize>() -> IMFSecureBuffer_Vtbl {
unsafe extern "system" fn GetIdentifier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSecureBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguididentifier: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIdentifier() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pguididentifier, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetIdentifier: GetIdentifier::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSecureBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSecureChannel_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSecureChannel {}
impl IMFSecureChannel_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSecureChannel_Impl, const OFFSET: isize>() -> IMFSecureChannel_Vtbl {
unsafe extern "system" fn GetCertificate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSecureChannel_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppcert: *mut *mut u8, pcbcert: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCertificate(::core::mem::transmute_copy(&ppcert), ::core::mem::transmute_copy(&pcbcert)).into()
}
unsafe extern "system" fn SetupSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSecureChannel_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbencryptedsessionkey: *const u8, cbsessionkey: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetupSession(::core::mem::transmute_copy(&pbencryptedsessionkey), ::core::mem::transmute_copy(&cbsessionkey)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCertificate: GetCertificate::<Identity, Impl, OFFSET>,
SetupSession: SetupSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSecureChannel as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSeekInfo_Impl: Sized {
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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSeekInfo {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSeekInfo_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSeekInfo_Impl, const OFFSET: isize>() -> IMFSeekInfo_Vtbl {
unsafe extern "system" fn GetNearestKeyFrames<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNearestKeyFrames(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSeekInfo as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorActivitiesReport_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSensorActivitiesReport {}
impl IMFSensorActivitiesReport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivitiesReport_Impl, const OFFSET: isize>() -> IMFSensorActivitiesReport_Vtbl {
unsafe extern "system" fn GetCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivitiesReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pccount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pccount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetActivityReport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivitiesReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, sensoractivityreport: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetActivityReport(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(sensoractivityreport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetActivityReportByDeviceName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetActivityReportByDeviceName(::core::mem::transmute(&symbolicname)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(sensoractivityreport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCount: GetCount::<Identity, Impl, OFFSET>,
GetActivityReport: GetActivityReport::<Identity, Impl, OFFSET>,
GetActivityReportByDeviceName: GetActivityReportByDeviceName::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorActivitiesReport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorActivitiesReportCallback_Impl: Sized {
fn OnActivitiesReport(&self, sensoractivitiesreport: ::core::option::Option<&IMFSensorActivitiesReport>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSensorActivitiesReportCallback {}
impl IMFSensorActivitiesReportCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivitiesReportCallback_Impl, const OFFSET: isize>() -> IMFSensorActivitiesReportCallback_Vtbl {
unsafe extern "system" fn OnActivitiesReport<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivitiesReportCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, sensoractivitiesreport: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnActivitiesReport(::windows::core::from_raw_borrowed(&sensoractivitiesreport)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnActivitiesReport: OnActivitiesReport::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorActivitiesReportCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorActivityMonitor_Impl: Sized {
fn Start(&self) -> ::windows::core::Result<()>;
fn Stop(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSensorActivityMonitor {}
impl IMFSensorActivityMonitor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityMonitor_Impl, const OFFSET: isize>() -> IMFSensorActivityMonitor_Vtbl {
unsafe extern "system" fn Start<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start().into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Start: Start::<Identity, Impl, OFFSET>, Stop: Stop::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorActivityMonitor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorActivityReport_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSensorActivityReport {}
impl IMFSensorActivityReport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityReport_Impl, const OFFSET: isize>() -> IMFSensorActivityReport_Vtbl {
unsafe extern "system" fn GetFriendlyName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, friendlyname: ::windows::core::PWSTR, cchfriendlyname: u32, pcchwritten: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetFriendlyName(::core::mem::transmute_copy(&friendlyname), ::core::mem::transmute_copy(&cchfriendlyname), ::core::mem::transmute_copy(&pcchwritten)).into()
}
unsafe extern "system" fn GetSymbolicLink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, symboliclink: ::windows::core::PWSTR, cchsymboliclink: u32, pcchwritten: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSymbolicLink(::core::mem::transmute_copy(&symboliclink), ::core::mem::transmute_copy(&cchsymboliclink), ::core::mem::transmute_copy(&pcchwritten)).into()
}
unsafe extern "system" fn GetProcessCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pccount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcessCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pccount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProcessActivity<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, ppprocessactivity: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcessActivity(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppprocessactivity, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetFriendlyName: GetFriendlyName::<Identity, Impl, OFFSET>,
GetSymbolicLink: GetSymbolicLink::<Identity, Impl, OFFSET>,
GetProcessCount: GetProcessCount::<Identity, Impl, OFFSET>,
GetProcessActivity: GetProcessActivity::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorActivityReport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorDevice_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSensorDevice {}
impl IMFSensorDevice_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>() -> IMFSensorDevice_Vtbl {
unsafe extern "system" fn GetDeviceId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdeviceid: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeviceId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdeviceid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDeviceType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptype: *mut MFSensorDeviceType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeviceType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pflags: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSymbolicLink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, symboliclink: ::windows::core::PWSTR, cchsymboliclink: i32, pcchwritten: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSymbolicLink(::core::mem::transmute_copy(&symboliclink), ::core::mem::transmute_copy(&cchsymboliclink), ::core::mem::transmute_copy(&pcchwritten)).into()
}
unsafe extern "system" fn GetDeviceAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeviceAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamAttributesCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, etype: MFSensorStreamType, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamAttributesCount(::core::mem::transmute_copy(&etype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamAttributes(::core::mem::transmute_copy(&etype), ::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSensorDeviceMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, emode: MFSensorDeviceMode) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSensorDeviceMode(::core::mem::transmute_copy(&emode)).into()
}
unsafe extern "system" fn GetSensorDeviceMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pemode: *mut MFSensorDeviceMode) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSensorDeviceMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pemode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDeviceId: GetDeviceId::<Identity, Impl, OFFSET>,
GetDeviceType: GetDeviceType::<Identity, Impl, OFFSET>,
GetFlags: GetFlags::<Identity, Impl, OFFSET>,
GetSymbolicLink: GetSymbolicLink::<Identity, Impl, OFFSET>,
GetDeviceAttributes: GetDeviceAttributes::<Identity, Impl, OFFSET>,
GetStreamAttributesCount: GetStreamAttributesCount::<Identity, Impl, OFFSET>,
GetStreamAttributes: GetStreamAttributes::<Identity, Impl, OFFSET>,
SetSensorDeviceMode: SetSensorDeviceMode::<Identity, Impl, OFFSET>,
GetSensorDeviceMode: GetSensorDeviceMode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorDevice as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorGroup_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSensorGroup {}
impl IMFSensorGroup_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>() -> IMFSensorGroup_Vtbl {
unsafe extern "system" fn GetSymbolicLink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, symboliclink: ::windows::core::PWSTR, cchsymboliclink: i32, pcchwritten: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSymbolicLink(::core::mem::transmute_copy(&symboliclink), ::core::mem::transmute_copy(&cchsymboliclink), ::core::mem::transmute_copy(&pcchwritten)).into()
}
unsafe extern "system" fn GetFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pflags: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSensorGroupAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSensorGroupAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSensorDeviceCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSensorDeviceCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSensorDevice<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppdevice: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSensorDevice(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdevice, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDefaultSensorDeviceIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultSensorDeviceIndex(::core::mem::transmute_copy(&dwindex)).into()
}
unsafe extern "system" fn GetDefaultSensorDeviceIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwindex: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDefaultSensorDeviceIndex() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwindex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateMediaSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppsource: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateMediaSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSymbolicLink: GetSymbolicLink::<Identity, Impl, OFFSET>,
GetFlags: GetFlags::<Identity, Impl, OFFSET>,
GetSensorGroupAttributes: GetSensorGroupAttributes::<Identity, Impl, OFFSET>,
GetSensorDeviceCount: GetSensorDeviceCount::<Identity, Impl, OFFSET>,
GetSensorDevice: GetSensorDevice::<Identity, Impl, OFFSET>,
SetDefaultSensorDeviceIndex: SetDefaultSensorDeviceIndex::<Identity, Impl, OFFSET>,
GetDefaultSensorDeviceIndex: GetDefaultSensorDeviceIndex::<Identity, Impl, OFFSET>,
CreateMediaSource: CreateMediaSource::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorGroup as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFSensorProcessActivity_Impl: Sized {
fn GetProcessId(&self) -> ::windows::core::Result<u32>;
fn GetStreamingState(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn GetStreamingMode(&self) -> ::windows::core::Result<MFSensorDeviceMode>;
fn GetReportTime(&self) -> ::windows::core::Result<super::super::Foundation::FILETIME>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFSensorProcessActivity {}
#[cfg(feature = "Win32_Foundation")]
impl IMFSensorProcessActivity_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProcessActivity_Impl, const OFFSET: isize>() -> IMFSensorProcessActivity_Vtbl {
unsafe extern "system" fn GetProcessId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppid: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcessId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamingState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfstreaming: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamingState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfstreaming, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStreamingMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmode: *mut MFSensorDeviceMode) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamingMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetReportTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pft: *mut super::super::Foundation::FILETIME) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetReportTime() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pft, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetProcessId: GetProcessId::<Identity, Impl, OFFSET>,
GetStreamingState: GetStreamingState::<Identity, Impl, OFFSET>,
GetStreamingMode: GetStreamingMode::<Identity, Impl, OFFSET>,
GetReportTime: GetReportTime::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorProcessActivity as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFSensorProfile_Impl: Sized {
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: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn AddBlockedControl(&self, wzblockedcontrol: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFSensorProfile {}
#[cfg(feature = "Win32_Foundation")]
impl IMFSensorProfile_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfile_Impl, const OFFSET: isize>() -> IMFSensorProfile_Vtbl {
unsafe extern "system" fn GetProfileId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pid: *mut SENSORPROFILEID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProfileId(::core::mem::transmute_copy(&pid)).into()
}
unsafe extern "system" fn AddProfileFilter<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, streamid: u32, wzfiltersetstring: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddProfileFilter(::core::mem::transmute_copy(&streamid), ::core::mem::transmute(&wzfiltersetstring)).into()
}
unsafe extern "system" fn IsMediaTypeSupported<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, streamid: u32, pmediatype: *mut ::core::ffi::c_void, pfsupported: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsMediaTypeSupported(::core::mem::transmute_copy(&streamid), ::windows::core::from_raw_borrowed(&pmediatype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfsupported, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddBlockedControl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wzblockedcontrol: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddBlockedControl(::core::mem::transmute(&wzblockedcontrol)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetProfileId: GetProfileId::<Identity, Impl, OFFSET>,
AddProfileFilter: AddProfileFilter::<Identity, Impl, OFFSET>,
IsMediaTypeSupported: IsMediaTypeSupported::<Identity, Impl, OFFSET>,
AddBlockedControl: AddBlockedControl::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorProfile as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorProfileCollection_Impl: Sized {
fn GetProfileCount(&self) -> u32;
fn GetProfile(&self, index: u32) -> ::windows::core::Result<IMFSensorProfile>;
fn AddProfile(&self, pprofile: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFSensorProfileCollection {}
impl IMFSensorProfileCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>() -> IMFSensorProfileCollection_Vtbl {
unsafe extern "system" fn GetProfileCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProfileCount()
}
unsafe extern "system" fn GetProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, ppprofile: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProfile(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppprofile, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprofile: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddProfile(::windows::core::from_raw_borrowed(&pprofile)).into()
}
unsafe extern "system" fn FindProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profileid: *const SENSORPROFILEID, ppprofile: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.FindProfile(::core::mem::transmute_copy(&profileid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppprofile, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveProfileByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveProfileByIndex(::core::mem::transmute_copy(&index))
}
unsafe extern "system" fn RemoveProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profileid: *const SENSORPROFILEID) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveProfile(::core::mem::transmute_copy(&profileid))
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetProfileCount: GetProfileCount::<Identity, Impl, OFFSET>,
GetProfile: GetProfile::<Identity, Impl, OFFSET>,
AddProfile: AddProfile::<Identity, Impl, OFFSET>,
FindProfile: FindProfile::<Identity, Impl, OFFSET>,
RemoveProfileByIndex: RemoveProfileByIndex::<Identity, Impl, OFFSET>,
RemoveProfile: RemoveProfile::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorProfileCollection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSensorStream_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSensorStream {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSensorStream_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorStream_Impl, const OFFSET: isize>() -> IMFSensorStream_Vtbl {
unsafe extern "system" fn GetMediaTypeCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaTypeCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaType(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CloneSensorStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppstream: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CloneSensorStream() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppstream, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetMediaTypeCount: GetMediaTypeCount::<Identity, Impl, OFFSET>,
GetMediaType: GetMediaType::<Identity, Impl, OFFSET>,
CloneSensorStream: CloneSensorStream::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorStream as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSensorTransformFactory_Impl: Sized {
fn GetFactoryAttributes(&self) -> ::windows::core::Result<IMFAttributes>;
fn InitializeFactory(&self, dwmaxtransformcount: u32, psensordevices: ::core::option::Option<&IMFCollection>, pattributes: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
fn GetTransformCount(&self) -> ::windows::core::Result<u32>;
fn GetTransformInformation(&self, transformindex: u32, pguidtransformid: *mut ::windows::core::GUID, ppattributes: *mut ::core::option::Option<IMFAttributes>, ppstreaminformation: *mut ::core::option::Option<IMFCollection>) -> ::windows::core::Result<()>;
fn CreateTransform(&self, guidsensortransformid: *const ::windows::core::GUID, pattributes: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<IMFDeviceTransform>;
}
impl ::windows::core::RuntimeName for IMFSensorTransformFactory {}
impl IMFSensorTransformFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorTransformFactory_Impl, const OFFSET: isize>() -> IMFSensorTransformFactory_Vtbl {
unsafe extern "system" fn GetFactoryAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFactoryAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InitializeFactory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeFactory(::core::mem::transmute_copy(&dwmaxtransformcount), ::windows::core::from_raw_borrowed(&psensordevices), ::windows::core::from_raw_borrowed(&pattributes)).into()
}
unsafe extern "system" fn GetTransformCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTransformCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTransformInformation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTransformInformation(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateTransform(::core::mem::transmute_copy(&guidsensortransformid), ::windows::core::from_raw_borrowed(&pattributes)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdevicemft, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetFactoryAttributes: GetFactoryAttributes::<Identity, Impl, OFFSET>,
InitializeFactory: InitializeFactory::<Identity, Impl, OFFSET>,
GetTransformCount: GetTransformCount::<Identity, Impl, OFFSET>,
GetTransformInformation: GetTransformInformation::<Identity, Impl, OFFSET>,
CreateTransform: CreateTransform::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSensorTransformFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSequencerSource_Impl: Sized {
fn AppendTopology(&self, ptopology: ::core::option::Option<&IMFTopology>, dwflags: u32) -> ::windows::core::Result<u32>;
fn DeleteTopology(&self, dwid: u32) -> ::windows::core::Result<()>;
fn GetPresentationContext(&self, ppd: ::core::option::Option<&IMFPresentationDescriptor>, pid: *mut u32, pptopology: *mut ::core::option::Option<IMFTopology>) -> ::windows::core::Result<()>;
fn UpdateTopology(&self, dwid: u32, ptopology: ::core::option::Option<&IMFTopology>) -> ::windows::core::Result<()>;
fn UpdateTopologyFlags(&self, dwid: u32, dwflags: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSequencerSource {}
impl IMFSequencerSource_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSequencerSource_Impl, const OFFSET: isize>() -> IMFSequencerSource_Vtbl {
unsafe extern "system" fn AppendTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AppendTopology(::windows::core::from_raw_borrowed(&ptopology), ::core::mem::transmute_copy(&dwflags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DeleteTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwid: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteTopology(::core::mem::transmute_copy(&dwid)).into()
}
unsafe extern "system" fn GetPresentationContext<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPresentationContext(::windows::core::from_raw_borrowed(&ppd), ::core::mem::transmute_copy(&pid), ::core::mem::transmute_copy(&pptopology)).into()
}
unsafe extern "system" fn UpdateTopology<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwid: u32, ptopology: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateTopology(::core::mem::transmute_copy(&dwid), ::windows::core::from_raw_borrowed(&ptopology)).into()
}
unsafe extern "system" fn UpdateTopologyFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwid: u32, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateTopologyFlags(::core::mem::transmute_copy(&dwid), ::core::mem::transmute_copy(&dwflags)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AppendTopology: AppendTopology::<Identity, Impl, OFFSET>,
DeleteTopology: DeleteTopology::<Identity, Impl, OFFSET>,
GetPresentationContext: GetPresentationContext::<Identity, Impl, OFFSET>,
UpdateTopology: UpdateTopology::<Identity, Impl, OFFSET>,
UpdateTopologyFlags: UpdateTopologyFlags::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSequencerSource as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSharingEngineClassFactory_Impl: Sized {
fn CreateInstance(&self, dwflags: u32, pattr: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<::windows::core::IUnknown>;
}
impl ::windows::core::RuntimeName for IMFSharingEngineClassFactory {}
impl IMFSharingEngineClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSharingEngineClassFactory_Impl, const OFFSET: isize>() -> IMFSharingEngineClassFactory_Vtbl {
unsafe extern "system" fn CreateInstance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateInstance(::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pattr)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppengine, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSharingEngineClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFShutdown_Impl: Sized {
fn Shutdown(&self) -> ::windows::core::Result<()>;
fn GetShutdownStatus(&self) -> ::windows::core::Result<MFSHUTDOWN_STATUS>;
}
impl ::windows::core::RuntimeName for IMFShutdown {}
impl IMFShutdown_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFShutdown_Impl, const OFFSET: isize>() -> IMFShutdown_Vtbl {
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFShutdown_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
unsafe extern "system" fn GetShutdownStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFShutdown_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstatus: *mut MFSHUTDOWN_STATUS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetShutdownStatus() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pstatus, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
GetShutdownStatus: GetShutdownStatus::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFShutdown as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSignedLibrary_Impl: Sized {
fn GetProcedureAddress(&self, name: &::windows::core::PCSTR, address: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSignedLibrary {}
impl IMFSignedLibrary_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSignedLibrary_Impl, const OFFSET: isize>() -> IMFSignedLibrary_Vtbl {
unsafe extern "system" fn GetProcedureAddress<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetProcedureAddress(::core::mem::transmute(&name), ::core::mem::transmute_copy(&address)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetProcedureAddress: GetProcedureAddress::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSignedLibrary as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFSimpleAudioVolume_Impl: Sized {
fn SetMasterVolume(&self, flevel: f32) -> ::windows::core::Result<()>;
fn GetMasterVolume(&self) -> ::windows::core::Result<f32>;
fn SetMute(&self, bmute: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetMute(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFSimpleAudioVolume {}
#[cfg(feature = "Win32_Foundation")]
impl IMFSimpleAudioVolume_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSimpleAudioVolume_Impl, const OFFSET: isize>() -> IMFSimpleAudioVolume_Vtbl {
unsafe extern "system" fn SetMasterVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flevel: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMasterVolume(::core::mem::transmute_copy(&flevel)).into()
}
unsafe extern "system" fn GetMasterVolume<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pflevel: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMasterVolume() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pflevel, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetMute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bmute: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMute(::core::mem::transmute_copy(&bmute)).into()
}
unsafe extern "system" fn GetMute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbmute: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMute() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbmute, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetMasterVolume: SetMasterVolume::<Identity, Impl, OFFSET>,
GetMasterVolume: GetMasterVolume::<Identity, Impl, OFFSET>,
SetMute: SetMute::<Identity, Impl, OFFSET>,
GetMute: GetMute::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSimpleAudioVolume as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSinkWriter_Impl: Sized {
fn AddStream(&self, ptargetmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<u32>;
fn SetInputMediaType(&self, dwstreamindex: u32, pinputmediatype: ::core::option::Option<&IMFMediaType>, pencodingparameters: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
fn BeginWriting(&self) -> ::windows::core::Result<()>;
fn WriteSample(&self, dwstreamindex: u32, psample: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFSinkWriter {}
impl IMFSinkWriter_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>() -> IMFSinkWriter_Vtbl {
unsafe extern "system" fn AddStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptargetmediatype: *mut ::core::ffi::c_void, pdwstreamindex: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddStream(::windows::core::from_raw_borrowed(&ptargetmediatype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamindex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetInputMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInputMediaType(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&pinputmediatype), ::windows::core::from_raw_borrowed(&pencodingparameters)).into()
}
unsafe extern "system" fn BeginWriting<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginWriting().into()
}
unsafe extern "system" fn WriteSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, psample: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WriteSample(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&psample)).into()
}
unsafe extern "system" fn SendStreamTick<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, lltimestamp: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SendStreamTick(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&lltimestamp)).into()
}
unsafe extern "system" fn PlaceMarker<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pvcontext: *const ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PlaceMarker(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&pvcontext)).into()
}
unsafe extern "system" fn NotifyEndOfSegment<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyEndOfSegment(::core::mem::transmute_copy(&dwstreamindex)).into()
}
unsafe extern "system" fn Flush<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Flush(::core::mem::transmute_copy(&dwstreamindex)).into()
}
unsafe extern "system" fn Finalize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Finalize().into()
}
unsafe extern "system" fn GetServiceForStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetServiceForStream(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pstats: *mut MF_SINK_WRITER_STATISTICS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStatistics(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&pstats)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AddStream: AddStream::<Identity, Impl, OFFSET>,
SetInputMediaType: SetInputMediaType::<Identity, Impl, OFFSET>,
BeginWriting: BeginWriting::<Identity, Impl, OFFSET>,
WriteSample: WriteSample::<Identity, Impl, OFFSET>,
SendStreamTick: SendStreamTick::<Identity, Impl, OFFSET>,
PlaceMarker: PlaceMarker::<Identity, Impl, OFFSET>,
NotifyEndOfSegment: NotifyEndOfSegment::<Identity, Impl, OFFSET>,
Flush: Flush::<Identity, Impl, OFFSET>,
Finalize: Finalize::<Identity, Impl, OFFSET>,
GetServiceForStream: GetServiceForStream::<Identity, Impl, OFFSET>,
GetStatistics: GetStatistics::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSinkWriter as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSinkWriterCallback_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSinkWriterCallback {}
impl IMFSinkWriterCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterCallback_Impl, const OFFSET: isize>() -> IMFSinkWriterCallback_Vtbl {
unsafe extern "system" fn OnFinalize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnFinalize(::core::mem::transmute_copy(&hrstatus)).into()
}
unsafe extern "system" fn OnMarker<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pvcontext: *const ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnMarker(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&pvcontext)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnFinalize: OnFinalize::<Identity, Impl, OFFSET>,
OnMarker: OnMarker::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSinkWriterCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSinkWriterCallback2_Impl: Sized + IMFSinkWriterCallback_Impl {
fn OnTransformChange(&self) -> ::windows::core::Result<()>;
fn OnStreamError(&self, dwstreamindex: u32, hrstatus: ::windows::core::HRESULT) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSinkWriterCallback2 {}
impl IMFSinkWriterCallback2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterCallback2_Impl, const OFFSET: isize>() -> IMFSinkWriterCallback2_Vtbl {
unsafe extern "system" fn OnTransformChange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterCallback2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnTransformChange().into()
}
unsafe extern "system" fn OnStreamError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterCallback2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnStreamError(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&hrstatus)).into()
}
Self {
base__: IMFSinkWriterCallback_Vtbl::new::<Identity, Impl, OFFSET>(),
OnTransformChange: OnTransformChange::<Identity, Impl, OFFSET>,
OnStreamError: OnStreamError::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSinkWriterCallback2 as ::windows::core::ComInterface>::IID || iid == &<IMFSinkWriterCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSinkWriterEncoderConfig_Impl: Sized {
fn SetTargetMediaType(&self, dwstreamindex: u32, ptargetmediatype: ::core::option::Option<&IMFMediaType>, pencodingparameters: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
fn PlaceEncodingParameters(&self, dwstreamindex: u32, pencodingparameters: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSinkWriterEncoderConfig {}
impl IMFSinkWriterEncoderConfig_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterEncoderConfig_Impl, const OFFSET: isize>() -> IMFSinkWriterEncoderConfig_Vtbl {
unsafe extern "system" fn SetTargetMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTargetMediaType(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&ptargetmediatype), ::windows::core::from_raw_borrowed(&pencodingparameters)).into()
}
unsafe extern "system" fn PlaceEncodingParameters<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterEncoderConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pencodingparameters: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PlaceEncodingParameters(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&pencodingparameters)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetTargetMediaType: SetTargetMediaType::<Identity, Impl, OFFSET>,
PlaceEncodingParameters: PlaceEncodingParameters::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSinkWriterEncoderConfig as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSinkWriterEx_Impl: Sized + IMFSinkWriter_Impl {
fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut ::windows::core::GUID, pptransform: *mut ::core::option::Option<IMFTransform>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSinkWriterEx {}
impl IMFSinkWriterEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSinkWriterEx_Impl, const OFFSET: isize>() -> IMFSinkWriterEx_Vtbl {
unsafe extern "system" fn GetTransformForStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTransformForStream(::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, Impl, OFFSET>(), GetTransformForStream: GetTransformForStream::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSinkWriterEx as ::windows::core::ComInterface>::IID || iid == &<IMFSinkWriter as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFSourceBuffer_Impl: Sized {
fn GetUpdating(&self) -> super::super::Foundation::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: ::core::option::Option<&IMFByteStream>, pmaxlen: *const u64) -> ::windows::core::Result<()>;
fn Abort(&self) -> ::windows::core::Result<()>;
fn Remove(&self, start: f64, end: f64) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFSourceBuffer {}
#[cfg(feature = "Win32_Foundation")]
impl IMFSourceBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>() -> IMFSourceBuffer_Vtbl {
unsafe extern "system" fn GetUpdating<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetUpdating()
}
unsafe extern "system" fn GetBuffered<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppbuffered: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBuffered() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppbuffered, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTimeStampOffset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTimeStampOffset()
}
unsafe extern "system" fn SetTimeStampOffset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, offset: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTimeStampOffset(::core::mem::transmute_copy(&offset)).into()
}
unsafe extern "system" fn GetAppendWindowStart<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAppendWindowStart()
}
unsafe extern "system" fn SetAppendWindowStart<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, time: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAppendWindowStart(::core::mem::transmute_copy(&time)).into()
}
unsafe extern "system" fn GetAppendWindowEnd<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAppendWindowEnd()
}
unsafe extern "system" fn SetAppendWindowEnd<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, time: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAppendWindowEnd(::core::mem::transmute_copy(&time)).into()
}
unsafe extern "system" fn Append<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdata: *const u8, len: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Append(::core::mem::transmute_copy(&pdata), ::core::mem::transmute_copy(&len)).into()
}
unsafe extern "system" fn AppendByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstream: *mut ::core::ffi::c_void, pmaxlen: *const u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AppendByteStream(::windows::core::from_raw_borrowed(&pstream), ::core::mem::transmute_copy(&pmaxlen)).into()
}
unsafe extern "system" fn Abort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Abort().into()
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, start: f64, end: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove(::core::mem::transmute_copy(&start), ::core::mem::transmute_copy(&end)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetUpdating: GetUpdating::<Identity, Impl, OFFSET>,
GetBuffered: GetBuffered::<Identity, Impl, OFFSET>,
GetTimeStampOffset: GetTimeStampOffset::<Identity, Impl, OFFSET>,
SetTimeStampOffset: SetTimeStampOffset::<Identity, Impl, OFFSET>,
GetAppendWindowStart: GetAppendWindowStart::<Identity, Impl, OFFSET>,
SetAppendWindowStart: SetAppendWindowStart::<Identity, Impl, OFFSET>,
GetAppendWindowEnd: GetAppendWindowEnd::<Identity, Impl, OFFSET>,
SetAppendWindowEnd: SetAppendWindowEnd::<Identity, Impl, OFFSET>,
Append: Append::<Identity, Impl, OFFSET>,
AppendByteStream: AppendByteStream::<Identity, Impl, OFFSET>,
Abort: Abort::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSourceBufferAppendMode_Impl: Sized {
fn GetAppendMode(&self) -> MF_MSE_APPEND_MODE;
fn SetAppendMode(&self, mode: MF_MSE_APPEND_MODE) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSourceBufferAppendMode {}
impl IMFSourceBufferAppendMode_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferAppendMode_Impl, const OFFSET: isize>() -> IMFSourceBufferAppendMode_Vtbl {
unsafe extern "system" fn GetAppendMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferAppendMode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_MSE_APPEND_MODE {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAppendMode()
}
unsafe extern "system" fn SetAppendMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferAppendMode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, mode: MF_MSE_APPEND_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAppendMode(::core::mem::transmute_copy(&mode)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAppendMode: GetAppendMode::<Identity, Impl, OFFSET>,
SetAppendMode: SetAppendMode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceBufferAppendMode as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSourceBufferList_Impl: Sized {
fn GetLength(&self) -> u32;
fn GetSourceBuffer(&self, index: u32) -> ::core::option::Option<IMFSourceBuffer>;
}
impl ::windows::core::RuntimeName for IMFSourceBufferList {}
impl IMFSourceBufferList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferList_Impl, const OFFSET: isize>() -> IMFSourceBufferList_Vtbl {
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLength()
}
unsafe extern "system" fn GetSourceBuffer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32) -> ::core::option::Option<IMFSourceBuffer> {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSourceBuffer(::core::mem::transmute_copy(&index))
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, Impl, OFFSET>,
GetSourceBuffer: GetSourceBuffer::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceBufferList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSourceBufferNotify_Impl: Sized {
fn OnUpdateStart(&self);
fn OnAbort(&self);
fn OnError(&self, hr: ::windows::core::HRESULT);
fn OnUpdate(&self);
fn OnUpdateEnd(&self);
}
impl ::windows::core::RuntimeName for IMFSourceBufferNotify {}
impl IMFSourceBufferNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferNotify_Impl, const OFFSET: isize>() -> IMFSourceBufferNotify_Vtbl {
unsafe extern "system" fn OnUpdateStart<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnUpdateStart()
}
unsafe extern "system" fn OnAbort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnAbort()
}
unsafe extern "system" fn OnError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hr: ::windows::core::HRESULT) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnError(::core::mem::transmute_copy(&hr))
}
unsafe extern "system" fn OnUpdate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnUpdate()
}
unsafe extern "system" fn OnUpdateEnd<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnUpdateEnd()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnUpdateStart: OnUpdateStart::<Identity, Impl, OFFSET>,
OnAbort: OnAbort::<Identity, Impl, OFFSET>,
OnError: OnError::<Identity, Impl, OFFSET>,
OnUpdate: OnUpdate::<Identity, Impl, OFFSET>,
OnUpdateEnd: OnUpdateEnd::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceBufferNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSourceOpenMonitor_Impl: Sized {
fn OnSourceEvent(&self, pevent: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSourceOpenMonitor {}
impl IMFSourceOpenMonitor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceOpenMonitor_Impl, const OFFSET: isize>() -> IMFSourceOpenMonitor_Vtbl {
unsafe extern "system" fn OnSourceEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceOpenMonitor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnSourceEvent(::windows::core::from_raw_borrowed(&pevent)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnSourceEvent: OnSourceEvent::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceOpenMonitor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSourceReader_Impl: Sized {
fn GetStreamSelection(&self, dwstreamindex: u32) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn SetStreamSelection(&self, dwstreamindex: u32, fselected: super::super::Foundation::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: ::core::option::Option<&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: *mut ::core::option::Option<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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSourceReader {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSourceReader_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReader_Impl, const OFFSET: isize>() -> IMFSourceReader_Vtbl {
unsafe extern "system" fn GetStreamSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pfselected: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamSelection(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfselected, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStreamSelection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, fselected: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamSelection(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&fselected)).into()
}
unsafe extern "system" fn GetNativeMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNativeMediaType(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&dwmediatypeindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCurrentMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentMediaType(::core::mem::transmute_copy(&dwstreamindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetCurrentMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentMediaType(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&pdwreserved), ::windows::core::from_raw_borrowed(&pmediatype)).into()
}
unsafe extern "system" fn SetCurrentPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCurrentPosition(::core::mem::transmute_copy(&guidtimeformat), ::core::mem::transmute_copy(&varposition)).into()
}
unsafe extern "system" fn ReadSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ReadSample(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Flush(::core::mem::transmute_copy(&dwstreamindex)).into()
}
unsafe extern "system" fn GetServiceForStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetServiceForStream(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPresentationAttribute(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&guidattribute)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvarattribute, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamSelection: GetStreamSelection::<Identity, Impl, OFFSET>,
SetStreamSelection: SetStreamSelection::<Identity, Impl, OFFSET>,
GetNativeMediaType: GetNativeMediaType::<Identity, Impl, OFFSET>,
GetCurrentMediaType: GetCurrentMediaType::<Identity, Impl, OFFSET>,
SetCurrentMediaType: SetCurrentMediaType::<Identity, Impl, OFFSET>,
SetCurrentPosition: SetCurrentPosition::<Identity, Impl, OFFSET>,
ReadSample: ReadSample::<Identity, Impl, OFFSET>,
Flush: Flush::<Identity, Impl, OFFSET>,
GetServiceForStream: GetServiceForStream::<Identity, Impl, OFFSET>,
GetPresentationAttribute: GetPresentationAttribute::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceReader as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSourceReaderCallback_Impl: Sized {
fn OnReadSample(&self, hrstatus: ::windows::core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
fn OnFlush(&self, dwstreamindex: u32) -> ::windows::core::Result<()>;
fn OnEvent(&self, dwstreamindex: u32, pevent: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSourceReaderCallback {}
impl IMFSourceReaderCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderCallback_Impl, const OFFSET: isize>() -> IMFSourceReaderCallback_Vtbl {
unsafe extern "system" fn OnReadSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnReadSample(::core::mem::transmute_copy(&hrstatus), ::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&dwstreamflags), ::core::mem::transmute_copy(&lltimestamp), ::windows::core::from_raw_borrowed(&psample)).into()
}
unsafe extern "system" fn OnFlush<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnFlush(::core::mem::transmute_copy(&dwstreamindex)).into()
}
unsafe extern "system" fn OnEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnEvent(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&pevent)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnReadSample: OnReadSample::<Identity, Impl, OFFSET>,
OnFlush: OnFlush::<Identity, Impl, OFFSET>,
OnEvent: OnEvent::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceReaderCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSourceReaderCallback2_Impl: Sized + IMFSourceReaderCallback_Impl {
fn OnTransformChange(&self) -> ::windows::core::Result<()>;
fn OnStreamError(&self, dwstreamindex: u32, hrstatus: ::windows::core::HRESULT) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFSourceReaderCallback2 {}
impl IMFSourceReaderCallback2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderCallback2_Impl, const OFFSET: isize>() -> IMFSourceReaderCallback2_Vtbl {
unsafe extern "system" fn OnTransformChange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderCallback2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnTransformChange().into()
}
unsafe extern "system" fn OnStreamError<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderCallback2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnStreamError(::core::mem::transmute_copy(&dwstreamindex), ::core::mem::transmute_copy(&hrstatus)).into()
}
Self {
base__: IMFSourceReaderCallback_Vtbl::new::<Identity, Impl, OFFSET>(),
OnTransformChange: OnTransformChange::<Identity, Impl, OFFSET>,
OnStreamError: OnStreamError::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceReaderCallback2 as ::windows::core::ComInterface>::IID || iid == &<IMFSourceReaderCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSourceReaderEx_Impl: Sized + IMFSourceReader_Impl {
fn SetNativeMediaType(&self, dwstreamindex: u32, pmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<u32>;
fn AddTransformForStream(&self, dwstreamindex: u32, ptransformoractivate: ::core::option::Option<&::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: *mut ::core::option::Option<IMFTransform>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSourceReaderEx {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSourceReaderEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderEx_Impl, const OFFSET: isize>() -> IMFSourceReaderEx_Vtbl {
unsafe extern "system" fn SetNativeMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SetNativeMediaType(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&pmediatype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddTransformForStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32, ptransformoractivate: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddTransformForStream(::core::mem::transmute_copy(&dwstreamindex), ::windows::core::from_raw_borrowed(&ptransformoractivate)).into()
}
unsafe extern "system" fn RemoveAllTransformsForStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceReaderEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveAllTransformsForStream(::core::mem::transmute_copy(&dwstreamindex)).into()
}
unsafe extern "system" fn GetTransformForStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTransformForStream(::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, Impl, OFFSET>(),
SetNativeMediaType: SetNativeMediaType::<Identity, Impl, OFFSET>,
AddTransformForStream: AddTransformForStream::<Identity, Impl, OFFSET>,
RemoveAllTransformsForStream: RemoveAllTransformsForStream::<Identity, Impl, OFFSET>,
GetTransformForStream: GetTransformForStream::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceReaderEx as ::windows::core::ComInterface>::IID || iid == &<IMFSourceReader as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_UI_Shell_PropertiesSystem\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFSourceResolver_Impl: Sized {
fn CreateObjectFromURL(&self, pwszurl: &::windows::core::PCWSTR, dwflags: u32, pprops: ::core::option::Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn CreateObjectFromByteStream(&self, pbytestream: ::core::option::Option<&IMFByteStream>, pwszurl: &::windows::core::PCWSTR, dwflags: u32, pprops: ::core::option::Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn BeginCreateObjectFromURL(&self, pwszurl: &::windows::core::PCWSTR, dwflags: u32, pprops: ::core::option::Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut ::core::option::Option<::windows::core::IUnknown>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndCreateObjectFromURL(&self, presult: ::core::option::Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn BeginCreateObjectFromByteStream(&self, pbytestream: ::core::option::Option<&IMFByteStream>, pwszurl: &::windows::core::PCWSTR, dwflags: u32, pprops: ::core::option::Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut ::core::option::Option<::windows::core::IUnknown>, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndCreateObjectFromByteStream(&self, presult: ::core::option::Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut ::core::option::Option<::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::windows::core::RuntimeName for IMFSourceResolver {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFSourceResolver_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceResolver_Impl, const OFFSET: isize>() -> IMFSourceResolver_Vtbl {
unsafe extern "system" fn CreateObjectFromURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateObjectFromURL(::core::mem::transmute(&pwszurl), ::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pprops), ::core::mem::transmute_copy(&pobjecttype), ::core::mem::transmute_copy(&ppobject)).into()
}
unsafe extern "system" fn CreateObjectFromByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateObjectFromByteStream(::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute(&pwszurl), ::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pprops), ::core::mem::transmute_copy(&pobjecttype), ::core::mem::transmute_copy(&ppobject)).into()
}
unsafe extern "system" fn BeginCreateObjectFromURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginCreateObjectFromURL(::core::mem::transmute(&pwszurl), ::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pprops), ::core::mem::transmute_copy(&ppiunknowncancelcookie), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndCreateObjectFromURL<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndCreateObjectFromURL(::windows::core::from_raw_borrowed(&presult), ::core::mem::transmute_copy(&pobjecttype), ::core::mem::transmute_copy(&ppobject)).into()
}
unsafe extern "system" fn BeginCreateObjectFromByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginCreateObjectFromByteStream(::windows::core::from_raw_borrowed(&pbytestream), ::core::mem::transmute(&pwszurl), ::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pprops), ::core::mem::transmute_copy(&ppiunknowncancelcookie), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndCreateObjectFromByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndCreateObjectFromByteStream(::windows::core::from_raw_borrowed(&presult), ::core::mem::transmute_copy(&pobjecttype), ::core::mem::transmute_copy(&ppobject)).into()
}
unsafe extern "system" fn CancelObjectCreation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, piunknowncancelcookie: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelObjectCreation(::windows::core::from_raw_borrowed(&piunknowncancelcookie)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateObjectFromURL: CreateObjectFromURL::<Identity, Impl, OFFSET>,
CreateObjectFromByteStream: CreateObjectFromByteStream::<Identity, Impl, OFFSET>,
BeginCreateObjectFromURL: BeginCreateObjectFromURL::<Identity, Impl, OFFSET>,
EndCreateObjectFromURL: EndCreateObjectFromURL::<Identity, Impl, OFFSET>,
BeginCreateObjectFromByteStream: BeginCreateObjectFromByteStream::<Identity, Impl, OFFSET>,
EndCreateObjectFromByteStream: EndCreateObjectFromByteStream::<Identity, Impl, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSourceResolver as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Media_Audio\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Media_Audio")]
pub trait IMFSpatialAudioObjectBuffer_Impl: Sized + 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 ::windows::core::RuntimeName for IMFSpatialAudioObjectBuffer {}
#[cfg(feature = "Win32_Media_Audio")]
impl IMFSpatialAudioObjectBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>() -> IMFSpatialAudioObjectBuffer_Vtbl {
unsafe extern "system" fn SetID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, u32id: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetID(::core::mem::transmute_copy(&u32id)).into()
}
unsafe extern "system" fn GetID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pu32id: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetID() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pu32id, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: super::Audio::AudioObjectType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetType(::core::mem::transmute_copy(&r#type)).into()
}
unsafe extern "system" fn GetType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptype: *mut super::Audio::AudioObjectType) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMetadataItems<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmetadataitems: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMetadataItems() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmetadataitems, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFMediaBuffer_Vtbl::new::<Identity, Impl, OFFSET>(),
SetID: SetID::<Identity, Impl, OFFSET>,
GetID: GetID::<Identity, Impl, OFFSET>,
SetType: SetType::<Identity, Impl, OFFSET>,
GetType: GetType::<Identity, Impl, OFFSET>,
GetMetadataItems: GetMetadataItems::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSpatialAudioObjectBuffer as ::windows::core::ComInterface>::IID || iid == &<IMFMediaBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFSpatialAudioSample_Impl: Sized + IMFSample_Impl {
fn GetObjectCount(&self) -> ::windows::core::Result<u32>;
fn AddSpatialAudioObject(&self, paudioobjbuffer: ::core::option::Option<&IMFSpatialAudioObjectBuffer>) -> ::windows::core::Result<()>;
fn GetSpatialAudioObjectByIndex(&self, dwindex: u32) -> ::windows::core::Result<IMFSpatialAudioObjectBuffer>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFSpatialAudioSample {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFSpatialAudioSample_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioSample_Impl, const OFFSET: isize>() -> IMFSpatialAudioSample_Vtbl {
unsafe extern "system" fn GetObjectCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwobjectcount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetObjectCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwobjectcount, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddSpatialAudioObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, paudioobjbuffer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddSpatialAudioObject(::windows::core::from_raw_borrowed(&paudioobjbuffer)).into()
}
unsafe extern "system" fn GetSpatialAudioObjectByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSpatialAudioSample_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppaudioobjbuffer: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSpatialAudioObjectByIndex(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppaudioobjbuffer, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFSample_Vtbl::new::<Identity, Impl, OFFSET>(),
GetObjectCount: GetObjectCount::<Identity, Impl, OFFSET>,
AddSpatialAudioObject: AddSpatialAudioObject::<Identity, Impl, OFFSET>,
GetSpatialAudioObjectByIndex: GetSpatialAudioObjectByIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSpatialAudioSample as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID || iid == &<IMFSample as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFStreamDescriptor_Impl: Sized + IMFAttributes_Impl {
fn GetStreamIdentifier(&self) -> ::windows::core::Result<u32>;
fn GetMediaTypeHandler(&self) -> ::windows::core::Result<IMFMediaTypeHandler>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFStreamDescriptor {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFStreamDescriptor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamDescriptor_Impl, const OFFSET: isize>() -> IMFStreamDescriptor_Vtbl {
unsafe extern "system" fn GetStreamIdentifier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwstreamidentifier: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamIdentifier() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwstreamidentifier, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMediaTypeHandler<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamDescriptor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediatypehandler: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaTypeHandler() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatypehandler, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetStreamIdentifier: GetStreamIdentifier::<Identity, Impl, OFFSET>,
GetMediaTypeHandler: GetMediaTypeHandler::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFStreamDescriptor as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFStreamSink_Impl: Sized + 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: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFStreamSink {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFStreamSink_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamSink_Impl, const OFFSET: isize>() -> IMFStreamSink_Vtbl {
unsafe extern "system" fn GetMediaSink<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediasink: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaSink() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediasink, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetIdentifier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwidentifier: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIdentifier() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwidentifier, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMediaTypeHandler<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pphandler: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaTypeHandler() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pphandler, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ProcessSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psample: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessSample(::windows::core::from_raw_borrowed(&psample)).into()
}
unsafe extern "system" fn PlaceMarker<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PlaceMarker(::core::mem::transmute_copy(&emarkertype), ::core::mem::transmute_copy(&pvarmarkervalue), ::core::mem::transmute_copy(&pvarcontextvalue)).into()
}
unsafe extern "system" fn Flush<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Flush().into()
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, Impl, OFFSET>(),
GetMediaSink: GetMediaSink::<Identity, Impl, OFFSET>,
GetIdentifier: GetIdentifier::<Identity, Impl, OFFSET>,
GetMediaTypeHandler: GetMediaTypeHandler::<Identity, Impl, OFFSET>,
ProcessSample: ProcessSample::<Identity, Impl, OFFSET>,
PlaceMarker: PlaceMarker::<Identity, Impl, OFFSET>,
Flush: Flush::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFStreamSink as ::windows::core::ComInterface>::IID || iid == &<IMFMediaEventGenerator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFStreamingSinkConfig_Impl: Sized {
fn StartStreaming(&self, fseekoffsetisbyteoffset: super::super::Foundation::BOOL, qwseekoffset: u64) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFStreamingSinkConfig {}
#[cfg(feature = "Win32_Foundation")]
impl IMFStreamingSinkConfig_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamingSinkConfig_Impl, const OFFSET: isize>() -> IMFStreamingSinkConfig_Vtbl {
unsafe extern "system" fn StartStreaming<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFStreamingSinkConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fseekoffsetisbyteoffset: super::super::Foundation::BOOL, qwseekoffset: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StartStreaming(::core::mem::transmute_copy(&fseekoffsetisbyteoffset), ::core::mem::transmute_copy(&qwseekoffset)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), StartStreaming: StartStreaming::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFStreamingSinkConfig as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFSystemId_Impl: Sized {
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 ::windows::core::RuntimeName for IMFSystemId {}
impl IMFSystemId_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSystemId_Impl, const OFFSET: isize>() -> IMFSystemId_Vtbl {
unsafe extern "system" fn GetData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFSystemId_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, size: *mut u32, data: *mut *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetData(::core::mem::transmute_copy(&size), ::core::mem::transmute_copy(&data)).into()
}
unsafe extern "system" fn Setup<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Setup(::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, Impl, OFFSET>,
Setup: Setup::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFSystemId as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFTimecodeTranslate_Impl: Sized {
fn BeginConvertTimecodeToHNS(&self, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndConvertTimecodeToHNS(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<i64>;
fn BeginConvertHNSToTimecode(&self, hnstime: i64, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndConvertHNSToTimecode(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFTimecodeTranslate {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFTimecodeTranslate_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimecodeTranslate_Impl, const OFFSET: isize>() -> IMFTimecodeTranslate_Vtbl {
unsafe extern "system" fn BeginConvertTimecodeToHNS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginConvertTimecodeToHNS(::core::mem::transmute_copy(&ppropvartimecode), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndConvertTimecodeToHNS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimecodeTranslate_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void, phnstime: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndConvertTimecodeToHNS(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phnstime, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginConvertHNSToTimecode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginConvertHNSToTimecode(::core::mem::transmute_copy(&hnstime), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
unsafe extern "system" fn EndConvertHNSToTimecode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndConvertHNSToTimecode(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppropvartimecode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginConvertTimecodeToHNS: BeginConvertTimecodeToHNS::<Identity, Impl, OFFSET>,
EndConvertTimecodeToHNS: EndConvertTimecodeToHNS::<Identity, Impl, OFFSET>,
BeginConvertHNSToTimecode: BeginConvertHNSToTimecode::<Identity, Impl, OFFSET>,
EndConvertHNSToTimecode: EndConvertHNSToTimecode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimecodeTranslate as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTimedText_Impl: Sized {
fn RegisterNotifications(&self, notify: ::core::option::Option<&IMFTimedTextNotify>) -> ::windows::core::Result<()>;
fn SelectTrack(&self, trackid: u32, selected: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn AddDataSource(&self, bytestream: ::core::option::Option<&IMFByteStream>, label: &::windows::core::PCWSTR, language: &::windows::core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: super::super::Foundation::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: super::super::Foundation::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: ::core::option::Option<&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: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn IsInBandEnabled(&self) -> super::super::Foundation::BOOL;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTimedText {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTimedText_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>() -> IMFTimedText_Vtbl {
unsafe extern "system" fn RegisterNotifications<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, notify: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RegisterNotifications(::windows::core::from_raw_borrowed(&notify)).into()
}
unsafe extern "system" fn SelectTrack<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, trackid: u32, selected: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SelectTrack(::core::mem::transmute_copy(&trackid), ::core::mem::transmute_copy(&selected)).into()
}
unsafe extern "system" fn AddDataSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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: super::super::Foundation::BOOL, trackid: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddDataSource(::windows::core::from_raw_borrowed(&bytestream), ::core::mem::transmute(&label), ::core::mem::transmute(&language), ::core::mem::transmute_copy(&kind), ::core::mem::transmute_copy(&isdefault)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(trackid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddDataSourceFromUrl<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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: super::super::Foundation::BOOL, trackid: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddDataSourceFromUrl(::core::mem::transmute(&url), ::core::mem::transmute(&label), ::core::mem::transmute(&language), ::core::mem::transmute_copy(&kind), ::core::mem::transmute_copy(&isdefault)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(trackid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddTrack<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddTrack(::core::mem::transmute(&label), ::core::mem::transmute(&language), ::core::mem::transmute_copy(&kind)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(track, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveTrack<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, track: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveTrack(::windows::core::from_raw_borrowed(&track)).into()
}
unsafe extern "system" fn GetCueTimeOffset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, offset: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCueTimeOffset() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(offset, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetCueTimeOffset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, offset: f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCueTimeOffset(::core::mem::transmute_copy(&offset)).into()
}
unsafe extern "system" fn GetTracks<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, tracks: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTracks() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(tracks, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetActiveTracks<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, activetracks: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetActiveTracks() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(activetracks, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTextTracks<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, texttracks: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTextTracks() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(texttracks, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetMetadataTracks<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, metadatatracks: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMetadataTracks() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(metadatatracks, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetInBandEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInBandEnabled(::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn IsInBandEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsInBandEnabled()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RegisterNotifications: RegisterNotifications::<Identity, Impl, OFFSET>,
SelectTrack: SelectTrack::<Identity, Impl, OFFSET>,
AddDataSource: AddDataSource::<Identity, Impl, OFFSET>,
AddDataSourceFromUrl: AddDataSourceFromUrl::<Identity, Impl, OFFSET>,
AddTrack: AddTrack::<Identity, Impl, OFFSET>,
RemoveTrack: RemoveTrack::<Identity, Impl, OFFSET>,
GetCueTimeOffset: GetCueTimeOffset::<Identity, Impl, OFFSET>,
SetCueTimeOffset: SetCueTimeOffset::<Identity, Impl, OFFSET>,
GetTracks: GetTracks::<Identity, Impl, OFFSET>,
GetActiveTracks: GetActiveTracks::<Identity, Impl, OFFSET>,
GetTextTracks: GetTextTracks::<Identity, Impl, OFFSET>,
GetMetadataTracks: GetMetadataTracks::<Identity, Impl, OFFSET>,
SetInBandEnabled: SetInBandEnabled::<Identity, Impl, OFFSET>,
IsInBandEnabled: IsInBandEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedText as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextBinary_Impl: Sized {
fn GetData(&self, data: *mut *mut u8, length: *mut u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTimedTextBinary {}
impl IMFTimedTextBinary_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextBinary_Impl, const OFFSET: isize>() -> IMFTimedTextBinary_Vtbl {
unsafe extern "system" fn GetData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextBinary_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, data: *mut *mut u8, length: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetData(::core::mem::transmute_copy(&data), ::core::mem::transmute_copy(&length)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetData: GetData::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextBinary as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextBouten_Impl: Sized {
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 ::windows::core::RuntimeName for IMFTimedTextBouten {}
impl IMFTimedTextBouten_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextBouten_Impl, const OFFSET: isize>() -> IMFTimedTextBouten_Vtbl {
unsafe extern "system" fn GetBoutenType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextBouten_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MF_TIMED_TEXT_BOUTEN_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBoutenType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBoutenColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextBouten_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MFARGB) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBoutenColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBoutenPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextBouten_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MF_TIMED_TEXT_BOUTEN_POSITION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBoutenPosition() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetBoutenType: GetBoutenType::<Identity, Impl, OFFSET>,
GetBoutenColor: GetBoutenColor::<Identity, Impl, OFFSET>,
GetBoutenPosition: GetBoutenPosition::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextBouten as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextCue_Impl: Sized {
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 ::windows::core::RuntimeName for IMFTimedTextCue {}
impl IMFTimedTextCue_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>() -> IMFTimedTextCue_Vtbl {
unsafe extern "system" fn GetId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetId()
}
unsafe extern "system" fn GetOriginalId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, originalid: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOriginalId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(originalid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCueKind<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_KIND {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCueKind()
}
unsafe extern "system" fn GetStartTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStartTime()
}
unsafe extern "system" fn GetDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> f64 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDuration()
}
unsafe extern "system" fn GetTrackId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTrackId()
}
unsafe extern "system" fn GetData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, data: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetData() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(data, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRegion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, region: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRegion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(region, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetStyle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, style: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStyle() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(style, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetLineCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLineCount()
}
unsafe extern "system" fn GetLine<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, line: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetLine(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(line, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetId: GetId::<Identity, Impl, OFFSET>,
GetOriginalId: GetOriginalId::<Identity, Impl, OFFSET>,
GetCueKind: GetCueKind::<Identity, Impl, OFFSET>,
GetStartTime: GetStartTime::<Identity, Impl, OFFSET>,
GetDuration: GetDuration::<Identity, Impl, OFFSET>,
GetTrackId: GetTrackId::<Identity, Impl, OFFSET>,
GetData: GetData::<Identity, Impl, OFFSET>,
GetRegion: GetRegion::<Identity, Impl, OFFSET>,
GetStyle: GetStyle::<Identity, Impl, OFFSET>,
GetLineCount: GetLineCount::<Identity, Impl, OFFSET>,
GetLine: GetLine::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextCue as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextCueList_Impl: Sized {
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: *mut ::core::option::Option<IMFTimedTextCue>) -> ::windows::core::Result<()>;
fn AddDataCue(&self, start: f64, duration: f64, data: *const u8, datasize: u32, cue: *mut ::core::option::Option<IMFTimedTextCue>) -> ::windows::core::Result<()>;
fn RemoveCue(&self, cue: ::core::option::Option<&IMFTimedTextCue>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTimedTextCueList {}
impl IMFTimedTextCueList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCueList_Impl, const OFFSET: isize>() -> IMFTimedTextCueList_Vtbl {
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLength()
}
unsafe extern "system" fn GetCueByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, cue: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCueByIndex(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCueById<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, id: u32, cue: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCueById(::core::mem::transmute_copy(&id)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCueByOriginalId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCueByOriginalId(::core::mem::transmute(&originalid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddTextCue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddTextCue(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddDataCue(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, cue: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveCue(::windows::core::from_raw_borrowed(&cue)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, Impl, OFFSET>,
GetCueByIndex: GetCueByIndex::<Identity, Impl, OFFSET>,
GetCueById: GetCueById::<Identity, Impl, OFFSET>,
GetCueByOriginalId: GetCueByOriginalId::<Identity, Impl, OFFSET>,
AddTextCue: AddTextCue::<Identity, Impl, OFFSET>,
AddDataCue: AddDataCue::<Identity, Impl, OFFSET>,
RemoveCue: RemoveCue::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextCueList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextFormattedText_Impl: Sized {
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: *mut ::core::option::Option<IMFTimedTextStyle>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTimedTextFormattedText {}
impl IMFTimedTextFormattedText_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextFormattedText_Impl, const OFFSET: isize>() -> IMFTimedTextFormattedText_Vtbl {
unsafe extern "system" fn GetText<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextFormattedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, text: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetText() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(text, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSubformattingCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextFormattedText_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSubformattingCount()
}
unsafe extern "system" fn GetSubformatting<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSubformatting(::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, Impl, OFFSET>,
GetSubformattingCount: GetSubformattingCount::<Identity, Impl, OFFSET>,
GetSubformatting: GetSubformatting::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextFormattedText as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTimedTextNotify_Impl: Sized {
fn TrackAdded(&self, trackid: u32);
fn TrackRemoved(&self, trackid: u32);
fn TrackSelected(&self, trackid: u32, selected: super::super::Foundation::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: ::core::option::Option<&IMFTimedTextCue>);
fn Reset(&self);
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTimedTextNotify {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTimedTextNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>() -> IMFTimedTextNotify_Vtbl {
unsafe extern "system" fn TrackAdded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, trackid: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TrackAdded(::core::mem::transmute_copy(&trackid))
}
unsafe extern "system" fn TrackRemoved<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, trackid: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TrackRemoved(::core::mem::transmute_copy(&trackid))
}
unsafe extern "system" fn TrackSelected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, trackid: u32, selected: super::super::Foundation::BOOL) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TrackSelected(::core::mem::transmute_copy(&trackid), ::core::mem::transmute_copy(&selected))
}
unsafe extern "system" fn TrackReadyStateChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, trackid: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TrackReadyStateChanged(::core::mem::transmute_copy(&trackid))
}
unsafe extern "system" fn Error<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, errorcode: MF_TIMED_TEXT_ERROR_CODE, extendederrorcode: ::windows::core::HRESULT, sourcetrackid: u32) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Error(::core::mem::transmute_copy(&errorcode), ::core::mem::transmute_copy(&extendederrorcode), ::core::mem::transmute_copy(&sourcetrackid))
}
unsafe extern "system" fn Cue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cue(::core::mem::transmute_copy(&cueevent), ::core::mem::transmute_copy(&currenttime), ::windows::core::from_raw_borrowed(&cue))
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
TrackAdded: TrackAdded::<Identity, Impl, OFFSET>,
TrackRemoved: TrackRemoved::<Identity, Impl, OFFSET>,
TrackSelected: TrackSelected::<Identity, Impl, OFFSET>,
TrackReadyStateChanged: TrackReadyStateChanged::<Identity, Impl, OFFSET>,
Error: Error::<Identity, Impl, OFFSET>,
Cue: Cue::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTimedTextRegion_Impl: Sized {
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<super::super::Foundation::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<super::super::Foundation::BOOL>;
fn GetZIndex(&self) -> ::windows::core::Result<i32>;
fn GetScrollMode(&self) -> ::windows::core::Result<MF_TIMED_TEXT_SCROLL_MODE>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTimedTextRegion {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTimedTextRegion_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>() -> IMFTimedTextRegion_Vtbl {
unsafe extern "system" fn GetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(name, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPosition(::core::mem::transmute_copy(&px), ::core::mem::transmute_copy(&py), ::core::mem::transmute_copy(&unittype)).into()
}
unsafe extern "system" fn GetExtent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetExtent(::core::mem::transmute_copy(&pwidth), ::core::mem::transmute_copy(&pheight), ::core::mem::transmute_copy(&unittype)).into()
}
unsafe extern "system" fn GetBackgroundColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bgcolor: *mut MFARGB) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBackgroundColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(bgcolor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetWritingMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, writingmode: *mut MF_TIMED_TEXT_WRITING_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetWritingMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(writingmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetDisplayAlignment<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, displayalign: *mut MF_TIMED_TEXT_DISPLAY_ALIGNMENT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDisplayAlignment() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(displayalign, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetLineHeight<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plineheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLineHeight(::core::mem::transmute_copy(&plineheight), ::core::mem::transmute_copy(&unittype)).into()
}
unsafe extern "system" fn GetClipOverflow<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, clipoverflow: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetClipOverflow() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(clipoverflow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetPadding<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPadding(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wrap: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetWrap() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wrap, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetZIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, zindex: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetZIndex() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(zindex, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetScrollMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scrollmode: *mut MF_TIMED_TEXT_SCROLL_MODE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetScrollMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(scrollmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetName: GetName::<Identity, Impl, OFFSET>,
GetPosition: GetPosition::<Identity, Impl, OFFSET>,
GetExtent: GetExtent::<Identity, Impl, OFFSET>,
GetBackgroundColor: GetBackgroundColor::<Identity, Impl, OFFSET>,
GetWritingMode: GetWritingMode::<Identity, Impl, OFFSET>,
GetDisplayAlignment: GetDisplayAlignment::<Identity, Impl, OFFSET>,
GetLineHeight: GetLineHeight::<Identity, Impl, OFFSET>,
GetClipOverflow: GetClipOverflow::<Identity, Impl, OFFSET>,
GetPadding: GetPadding::<Identity, Impl, OFFSET>,
GetWrap: GetWrap::<Identity, Impl, OFFSET>,
GetZIndex: GetZIndex::<Identity, Impl, OFFSET>,
GetScrollMode: GetScrollMode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextRegion as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextRuby_Impl: Sized {
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 ::windows::core::RuntimeName for IMFTimedTextRuby {}
impl IMFTimedTextRuby_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRuby_Impl, const OFFSET: isize>() -> IMFTimedTextRuby_Vtbl {
unsafe extern "system" fn GetRubyText<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rubytext: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRubyText() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rubytext, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRubyPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MF_TIMED_TEXT_RUBY_POSITION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRubyPosition() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRubyAlign<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MF_TIMED_TEXT_RUBY_ALIGN) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRubyAlign() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRubyReserve<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut MF_TIMED_TEXT_RUBY_RESERVE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRubyReserve() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetRubyText: GetRubyText::<Identity, Impl, OFFSET>,
GetRubyPosition: GetRubyPosition::<Identity, Impl, OFFSET>,
GetRubyAlign: GetRubyAlign::<Identity, Impl, OFFSET>,
GetRubyReserve: GetRubyReserve::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextRuby as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTimedTextStyle_Impl: Sized {
fn GetName(&self) -> ::windows::core::Result<::windows::core::PWSTR>;
fn IsExternal(&self) -> super::super::Foundation::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<super::super::Foundation::BOOL>;
fn GetFontStyle(&self) -> ::windows::core::Result<MF_TIMED_TEXT_FONT_STYLE>;
fn GetBold(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn GetRightToLeft(&self) -> ::windows::core::Result<super::super::Foundation::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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTimedTextStyle {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTimedTextStyle_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>() -> IMFTimedTextStyle_Vtbl {
unsafe extern "system" fn GetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(name, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsExternal<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsExternal()
}
unsafe extern "system" fn GetFontFamily<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fontfamily: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFontFamily() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(fontfamily, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFontSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fontsize: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetFontSize(::core::mem::transmute_copy(&fontsize), ::core::mem::transmute_copy(&unittype)).into()
}
unsafe extern "system" fn GetColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, color: *mut MFARGB) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(color, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBackgroundColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bgcolor: *mut MFARGB) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBackgroundColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(bgcolor, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetShowBackgroundAlways<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, showbackgroundalways: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetShowBackgroundAlways() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(showbackgroundalways, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFontStyle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fontstyle: *mut MF_TIMED_TEXT_FONT_STYLE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFontStyle() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(fontstyle, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBold<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bold: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBold() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(bold, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetRightToLeft<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, righttoleft: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRightToLeft() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(righttoleft, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTextAlignment<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, textalign: *mut MF_TIMED_TEXT_ALIGNMENT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTextAlignment() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(textalign, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTextDecoration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, textdecoration: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTextDecoration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(textdecoration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTextOutline<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTextOutline(::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, Impl, OFFSET>,
IsExternal: IsExternal::<Identity, Impl, OFFSET>,
GetFontFamily: GetFontFamily::<Identity, Impl, OFFSET>,
GetFontSize: GetFontSize::<Identity, Impl, OFFSET>,
GetColor: GetColor::<Identity, Impl, OFFSET>,
GetBackgroundColor: GetBackgroundColor::<Identity, Impl, OFFSET>,
GetShowBackgroundAlways: GetShowBackgroundAlways::<Identity, Impl, OFFSET>,
GetFontStyle: GetFontStyle::<Identity, Impl, OFFSET>,
GetBold: GetBold::<Identity, Impl, OFFSET>,
GetRightToLeft: GetRightToLeft::<Identity, Impl, OFFSET>,
GetTextAlignment: GetTextAlignment::<Identity, Impl, OFFSET>,
GetTextDecoration: GetTextDecoration::<Identity, Impl, OFFSET>,
GetTextOutline: GetTextOutline::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextStyle as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTimedTextStyle2_Impl: Sized {
fn GetRuby(&self) -> ::windows::core::Result<IMFTimedTextRuby>;
fn GetBouten(&self) -> ::windows::core::Result<IMFTimedTextBouten>;
fn IsTextCombined(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
fn GetFontAngleInDegrees(&self) -> ::windows::core::Result<f64>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTimedTextStyle2 {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTimedTextStyle2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle2_Impl, const OFFSET: isize>() -> IMFTimedTextStyle2_Vtbl {
unsafe extern "system" fn GetRuby<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ruby: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRuby() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ruby, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetBouten<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bouten: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBouten() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(bouten, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsTextCombined<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsTextCombined() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFontAngleInDegrees<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut f64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFontAngleInDegrees() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetRuby: GetRuby::<Identity, Impl, OFFSET>,
GetBouten: GetBouten::<Identity, Impl, OFFSET>,
IsTextCombined: IsTextCombined::<Identity, Impl, OFFSET>,
GetFontAngleInDegrees: GetFontAngleInDegrees::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextStyle2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTimedTextTrack_Impl: Sized {
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) -> super::super::Foundation::BOOL;
fn GetInBandMetadataTrackDispatchType(&self) -> ::windows::core::Result<::windows::core::PWSTR>;
fn IsActive(&self) -> super::super::Foundation::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>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTimedTextTrack {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTimedTextTrack_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>() -> IMFTimedTextTrack_Vtbl {
unsafe extern "system" fn GetId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetId()
}
unsafe extern "system" fn GetLabel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, label: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetLabel() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(label, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLabel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, label: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLabel(::core::mem::transmute(&label)).into()
}
unsafe extern "system" fn GetLanguage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, language: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetLanguage() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(language, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTrackKind<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_KIND {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTrackKind()
}
unsafe extern "system" fn IsInBand<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsInBand()
}
unsafe extern "system" fn GetInBandMetadataTrackDispatchType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dispatchtype: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInBandMetadataTrackDispatchType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(dispatchtype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsActive<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsActive()
}
unsafe extern "system" fn GetErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_TIMED_TEXT_ERROR_CODE {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetErrorCode()
}
unsafe extern "system" fn GetExtendedErrorCode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetExtendedErrorCode().into()
}
unsafe extern "system" fn GetDataFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, format: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDataFormat() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(format, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetReadyState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_READY_STATE {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetReadyState()
}
unsafe extern "system" fn GetCueList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, cues: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCueList() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cues, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetId: GetId::<Identity, Impl, OFFSET>,
GetLabel: GetLabel::<Identity, Impl, OFFSET>,
SetLabel: SetLabel::<Identity, Impl, OFFSET>,
GetLanguage: GetLanguage::<Identity, Impl, OFFSET>,
GetTrackKind: GetTrackKind::<Identity, Impl, OFFSET>,
IsInBand: IsInBand::<Identity, Impl, OFFSET>,
GetInBandMetadataTrackDispatchType: GetInBandMetadataTrackDispatchType::<Identity, Impl, OFFSET>,
IsActive: IsActive::<Identity, Impl, OFFSET>,
GetErrorCode: GetErrorCode::<Identity, Impl, OFFSET>,
GetExtendedErrorCode: GetExtendedErrorCode::<Identity, Impl, OFFSET>,
GetDataFormat: GetDataFormat::<Identity, Impl, OFFSET>,
GetReadyState: GetReadyState::<Identity, Impl, OFFSET>,
GetCueList: GetCueList::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextTrack as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimedTextTrackList_Impl: Sized {
fn GetLength(&self) -> u32;
fn GetTrack(&self, index: u32) -> ::windows::core::Result<IMFTimedTextTrack>;
fn GetTrackById(&self, trackid: u32) -> ::windows::core::Result<IMFTimedTextTrack>;
}
impl ::windows::core::RuntimeName for IMFTimedTextTrackList {}
impl IMFTimedTextTrackList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrackList_Impl, const OFFSET: isize>() -> IMFTimedTextTrackList_Vtbl {
unsafe extern "system" fn GetLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrackList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> u32 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetLength()
}
unsafe extern "system" fn GetTrack<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrackList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, track: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTrack(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(track, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTrackById<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimedTextTrackList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, trackid: u32, track: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTrackById(::core::mem::transmute_copy(&trackid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(track, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, Impl, OFFSET>,
GetTrack: GetTrack::<Identity, Impl, OFFSET>,
GetTrackById: GetTrackById::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimedTextTrackList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTimer_Impl: Sized {
fn SetTimer(&self, dwflags: u32, llclocktime: i64, pcallback: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<::windows::core::IUnknown>;
fn CancelTimer(&self, punkkey: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTimer {}
impl IMFTimer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimer_Impl, const OFFSET: isize>() -> IMFTimer_Vtbl {
unsafe extern "system" fn SetTimer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SetTimer(::core::mem::transmute_copy(&dwflags), ::core::mem::transmute_copy(&llclocktime), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&punkstate)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppunkkey, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CancelTimer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTimer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punkkey: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CancelTimer(::windows::core::from_raw_borrowed(&punkkey)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetTimer: SetTimer::<Identity, Impl, OFFSET>,
CancelTimer: CancelTimer::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTimer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTopoLoader_Impl: Sized {
fn Load(&self, pinputtopo: ::core::option::Option<&IMFTopology>, ppoutputtopo: *mut ::core::option::Option<IMFTopology>, pcurrenttopo: ::core::option::Option<&IMFTopology>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTopoLoader {}
impl IMFTopoLoader_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopoLoader_Impl, const OFFSET: isize>() -> IMFTopoLoader_Vtbl {
unsafe extern "system" fn Load<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Load(::windows::core::from_raw_borrowed(&pinputtopo), ::core::mem::transmute_copy(&ppoutputtopo), ::windows::core::from_raw_borrowed(&pcurrenttopo)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Load: Load::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTopoLoader as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFTopology_Impl: Sized + IMFAttributes_Impl {
fn GetTopologyID(&self) -> ::windows::core::Result<u64>;
fn AddNode(&self, pnode: ::core::option::Option<&IMFTopologyNode>) -> ::windows::core::Result<()>;
fn RemoveNode(&self, pnode: ::core::option::Option<&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: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFTopology {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFTopology_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>() -> IMFTopology_Vtbl {
unsafe extern "system" fn GetTopologyID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pid: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTopologyID() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddNode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnode: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddNode(::windows::core::from_raw_borrowed(&pnode)).into()
}
unsafe extern "system" fn RemoveNode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnode: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveNode(::windows::core::from_raw_borrowed(&pnode)).into()
}
unsafe extern "system" fn GetNodeCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwnodes: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNodeCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pwnodes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetNode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, windex: u16, ppnode: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNode(::core::mem::transmute_copy(&windex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppnode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Clear<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Clear().into()
}
unsafe extern "system" fn CloneFrom<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptopology: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CloneFrom(::windows::core::from_raw_borrowed(&ptopology)).into()
}
unsafe extern "system" fn GetNodeByID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, qwtoponodeid: u64, ppnode: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNodeByID(::core::mem::transmute_copy(&qwtoponodeid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppnode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetSourceNodeCollection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppcollection: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSourceNodeCollection() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcollection, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputNodeCollection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopology_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppcollection: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputNodeCollection() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcollection, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
GetTopologyID: GetTopologyID::<Identity, Impl, OFFSET>,
AddNode: AddNode::<Identity, Impl, OFFSET>,
RemoveNode: RemoveNode::<Identity, Impl, OFFSET>,
GetNodeCount: GetNodeCount::<Identity, Impl, OFFSET>,
GetNode: GetNode::<Identity, Impl, OFFSET>,
Clear: Clear::<Identity, Impl, OFFSET>,
CloneFrom: CloneFrom::<Identity, Impl, OFFSET>,
GetNodeByID: GetNodeByID::<Identity, Impl, OFFSET>,
GetSourceNodeCollection: GetSourceNodeCollection::<Identity, Impl, OFFSET>,
GetOutputNodeCollection: GetOutputNodeCollection::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTopology as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFTopologyNode_Impl: Sized + IMFAttributes_Impl {
fn SetObject(&self, pobject: ::core::option::Option<&::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: ::core::option::Option<&IMFTopologyNode>, dwinputindexondownstreamnode: u32) -> ::windows::core::Result<()>;
fn DisconnectOutput(&self, dwoutputindex: u32) -> ::windows::core::Result<()>;
fn GetInput(&self, dwinputindex: u32, ppupstreamnode: *mut ::core::option::Option<IMFTopologyNode>, pdwoutputindexonupstreamnode: *mut u32) -> ::windows::core::Result<()>;
fn GetOutput(&self, dwoutputindex: u32, ppdownstreamnode: *mut ::core::option::Option<IMFTopologyNode>, pdwinputindexondownstreamnode: *mut u32) -> ::windows::core::Result<()>;
fn SetOutputPrefType(&self, dwoutputindex: u32, ptype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
fn GetOutputPrefType(&self, dwoutputindex: u32) -> ::windows::core::Result<IMFMediaType>;
fn SetInputPrefType(&self, dwinputindex: u32, ptype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
fn GetInputPrefType(&self, dwinputindex: u32) -> ::windows::core::Result<IMFMediaType>;
fn CloneFrom(&self, pnode: ::core::option::Option<&IMFTopologyNode>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFTopologyNode {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFTopologyNode_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>() -> IMFTopologyNode_Vtbl {
unsafe extern "system" fn SetObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pobject: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetObject(::windows::core::from_raw_borrowed(&pobject)).into()
}
unsafe extern "system" fn GetObject<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetObject() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppobject, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetNodeType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptype: *mut MF_TOPOLOGY_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNodeType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTopoNodeID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pid: *mut u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTopoNodeID() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetTopoNodeID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ulltopoid: u64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTopoNodeID(::core::mem::transmute_copy(&ulltopoid)).into()
}
unsafe extern "system" fn GetInputCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcinputs: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcinputs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcoutputs: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcoutputs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ConnectOutput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputindex: u32, pdownstreamnode: *mut ::core::ffi::c_void, dwinputindexondownstreamnode: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ConnectOutput(::core::mem::transmute_copy(&dwoutputindex), ::windows::core::from_raw_borrowed(&pdownstreamnode), ::core::mem::transmute_copy(&dwinputindexondownstreamnode)).into()
}
unsafe extern "system" fn DisconnectOutput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisconnectOutput(::core::mem::transmute_copy(&dwoutputindex)).into()
}
unsafe extern "system" fn GetInput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetInput(::core::mem::transmute_copy(&dwinputindex), ::core::mem::transmute_copy(&ppupstreamnode), ::core::mem::transmute_copy(&pdwoutputindexonupstreamnode)).into()
}
unsafe extern "system" fn GetOutput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetOutput(::core::mem::transmute_copy(&dwoutputindex), ::core::mem::transmute_copy(&ppdownstreamnode), ::core::mem::transmute_copy(&pdwinputindexondownstreamnode)).into()
}
unsafe extern "system" fn SetOutputPrefType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputindex: u32, ptype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputPrefType(::core::mem::transmute_copy(&dwoutputindex), ::windows::core::from_raw_borrowed(&ptype)).into()
}
unsafe extern "system" fn GetOutputPrefType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputindex: u32, pptype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputPrefType(::core::mem::transmute_copy(&dwoutputindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetInputPrefType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputindex: u32, ptype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInputPrefType(::core::mem::transmute_copy(&dwinputindex), ::windows::core::from_raw_borrowed(&ptype)).into()
}
unsafe extern "system" fn GetInputPrefType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputindex: u32, pptype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputPrefType(::core::mem::transmute_copy(&dwinputindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CloneFrom<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnode: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CloneFrom(::windows::core::from_raw_borrowed(&pnode)).into()
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
SetObject: SetObject::<Identity, Impl, OFFSET>,
GetObject: GetObject::<Identity, Impl, OFFSET>,
GetNodeType: GetNodeType::<Identity, Impl, OFFSET>,
GetTopoNodeID: GetTopoNodeID::<Identity, Impl, OFFSET>,
SetTopoNodeID: SetTopoNodeID::<Identity, Impl, OFFSET>,
GetInputCount: GetInputCount::<Identity, Impl, OFFSET>,
GetOutputCount: GetOutputCount::<Identity, Impl, OFFSET>,
ConnectOutput: ConnectOutput::<Identity, Impl, OFFSET>,
DisconnectOutput: DisconnectOutput::<Identity, Impl, OFFSET>,
GetInput: GetInput::<Identity, Impl, OFFSET>,
GetOutput: GetOutput::<Identity, Impl, OFFSET>,
SetOutputPrefType: SetOutputPrefType::<Identity, Impl, OFFSET>,
GetOutputPrefType: GetOutputPrefType::<Identity, Impl, OFFSET>,
SetInputPrefType: SetInputPrefType::<Identity, Impl, OFFSET>,
GetInputPrefType: GetInputPrefType::<Identity, Impl, OFFSET>,
CloneFrom: CloneFrom::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTopologyNode as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTopologyNodeAttributeEditor_Impl: Sized {
fn UpdateNodeAttributes(&self, topoid: u64, cupdates: u32, pupdates: *const MFTOPONODE_ATTRIBUTE_UPDATE) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTopologyNodeAttributeEditor {}
impl IMFTopologyNodeAttributeEditor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNodeAttributeEditor_Impl, const OFFSET: isize>() -> IMFTopologyNodeAttributeEditor_Vtbl {
unsafe extern "system" fn UpdateNodeAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyNodeAttributeEditor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, topoid: u64, cupdates: u32, pupdates: *const MFTOPONODE_ATTRIBUTE_UPDATE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateNodeAttributes(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTopologyNodeAttributeEditor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTopologyServiceLookup_Impl: Sized {
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 ::windows::core::RuntimeName for IMFTopologyServiceLookup {}
impl IMFTopologyServiceLookup_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyServiceLookup_Impl, const OFFSET: isize>() -> IMFTopologyServiceLookup_Vtbl {
unsafe extern "system" fn LookupService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LookupService(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTopologyServiceLookup as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTopologyServiceLookupClient_Impl: Sized {
fn InitServicePointers(&self, plookup: ::core::option::Option<&IMFTopologyServiceLookup>) -> ::windows::core::Result<()>;
fn ReleaseServicePointers(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTopologyServiceLookupClient {}
impl IMFTopologyServiceLookupClient_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyServiceLookupClient_Impl, const OFFSET: isize>() -> IMFTopologyServiceLookupClient_Vtbl {
unsafe extern "system" fn InitServicePointers<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyServiceLookupClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plookup: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitServicePointers(::windows::core::from_raw_borrowed(&plookup)).into()
}
unsafe extern "system" fn ReleaseServicePointers<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTopologyServiceLookupClient_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ReleaseServicePointers().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InitServicePointers: InitServicePointers::<Identity, Impl, OFFSET>,
ReleaseServicePointers: ReleaseServicePointers::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTopologyServiceLookupClient as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTrackedSample_Impl: Sized {
fn SetAllocator(&self, psampleallocator: ::core::option::Option<&IMFAsyncCallback>, punkstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFTrackedSample {}
impl IMFTrackedSample_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTrackedSample_Impl, const OFFSET: isize>() -> IMFTrackedSample_Vtbl {
unsafe extern "system" fn SetAllocator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllocator(::windows::core::from_raw_borrowed(&psampleallocator), ::windows::core::from_raw_borrowed(&punkstate)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetAllocator: SetAllocator::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTrackedSample as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTranscodeProfile_Impl: Sized {
fn SetAudioAttributes(&self, pattrs: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
fn GetAudioAttributes(&self) -> ::windows::core::Result<IMFAttributes>;
fn SetVideoAttributes(&self, pattrs: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
fn GetVideoAttributes(&self) -> ::windows::core::Result<IMFAttributes>;
fn SetContainerAttributes(&self, pattrs: ::core::option::Option<&IMFAttributes>) -> ::windows::core::Result<()>;
fn GetContainerAttributes(&self) -> ::windows::core::Result<IMFAttributes>;
}
impl ::windows::core::RuntimeName for IMFTranscodeProfile {}
impl IMFTranscodeProfile_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>() -> IMFTranscodeProfile_Vtbl {
unsafe extern "system" fn SetAudioAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pattrs: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAudioAttributes(::windows::core::from_raw_borrowed(&pattrs)).into()
}
unsafe extern "system" fn GetAudioAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattrs: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAudioAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetVideoAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pattrs: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoAttributes(::windows::core::from_raw_borrowed(&pattrs)).into()
}
unsafe extern "system" fn GetVideoAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattrs: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetContainerAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pattrs: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetContainerAttributes(::windows::core::from_raw_borrowed(&pattrs)).into()
}
unsafe extern "system" fn GetContainerAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppattrs: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetContainerAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppattrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetAudioAttributes: SetAudioAttributes::<Identity, Impl, OFFSET>,
GetAudioAttributes: GetAudioAttributes::<Identity, Impl, OFFSET>,
SetVideoAttributes: SetVideoAttributes::<Identity, Impl, OFFSET>,
GetVideoAttributes: GetVideoAttributes::<Identity, Impl, OFFSET>,
SetContainerAttributes: SetContainerAttributes::<Identity, Impl, OFFSET>,
GetContainerAttributes: GetContainerAttributes::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTranscodeProfile as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTranscodeSinkInfoProvider_Impl: Sized {
fn SetOutputFile(&self, pwszfilename: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn SetOutputByteStream(&self, pbytestreamactivate: ::core::option::Option<&IMFActivate>) -> ::windows::core::Result<()>;
fn SetProfile(&self, pprofile: ::core::option::Option<&IMFTranscodeProfile>) -> ::windows::core::Result<()>;
fn GetSinkInfo(&self) -> ::windows::core::Result<MF_TRANSCODE_SINK_INFO>;
}
impl ::windows::core::RuntimeName for IMFTranscodeSinkInfoProvider {}
impl IMFTranscodeSinkInfoProvider_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>() -> IMFTranscodeSinkInfoProvider_Vtbl {
unsafe extern "system" fn SetOutputFile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszfilename: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputFile(::core::mem::transmute(&pwszfilename)).into()
}
unsafe extern "system" fn SetOutputByteStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbytestreamactivate: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputByteStream(::windows::core::from_raw_borrowed(&pbytestreamactivate)).into()
}
unsafe extern "system" fn SetProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pprofile: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProfile(::windows::core::from_raw_borrowed(&pprofile)).into()
}
unsafe extern "system" fn GetSinkInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psinkinfo: *mut MF_TRANSCODE_SINK_INFO) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSinkInfo() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(psinkinfo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetOutputFile: SetOutputFile::<Identity, Impl, OFFSET>,
SetOutputByteStream: SetOutputByteStream::<Identity, Impl, OFFSET>,
SetProfile: SetProfile::<Identity, Impl, OFFSET>,
GetSinkInfo: GetSinkInfo::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTranscodeSinkInfoProvider as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTransform_Impl: Sized {
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: ::core::option::Option<&IMFMediaType>, dwflags: u32) -> ::windows::core::Result<()>;
fn SetOutputType(&self, dwoutputstreamid: u32, ptype: ::core::option::Option<&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: ::core::option::Option<&IMFMediaEvent>) -> ::windows::core::Result<()>;
fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> ::windows::core::Result<()>;
fn ProcessInput(&self, dwinputstreamid: u32, psample: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFTransform {}
impl IMFTransform_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>() -> IMFTransform_Vtbl {
unsafe extern "system" fn GetStreamLimits<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamLimits(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamCount(::core::mem::transmute_copy(&pcinputstreams), ::core::mem::transmute_copy(&pcoutputstreams)).into()
}
unsafe extern "system" fn GetStreamIDs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputidarraysize: u32, pdwinputids: *mut u32, dwoutputidarraysize: u32, pdwoutputids: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetStreamIDs(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pstreaminfo: *mut MFT_INPUT_STREAM_INFO) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetInputStreamInfo(::core::mem::transmute_copy(&dwinputstreamid), ::core::mem::transmute_copy(&pstreaminfo)).into()
}
unsafe extern "system" fn GetOutputStreamInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, pstreaminfo: *mut MFT_OUTPUT_STREAM_INFO) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStreamInfo(::core::mem::transmute_copy(&dwoutputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pstreaminfo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAttributes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetInputStreamAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputStreamAttributes(::core::mem::transmute_copy(&dwinputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputStreamAttributes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, pattributes: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStreamAttributes(::core::mem::transmute_copy(&dwoutputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pattributes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DeleteInputStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteInputStream(::core::mem::transmute_copy(&dwstreamid)).into()
}
unsafe extern "system" fn AddInputStreams<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, cstreams: u32, adwstreamids: *const u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddInputStreams(::core::mem::transmute_copy(&cstreams), ::core::mem::transmute_copy(&adwstreamids)).into()
}
unsafe extern "system" fn GetInputAvailableType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputAvailableType(::core::mem::transmute_copy(&dwinputstreamid), ::core::mem::transmute_copy(&dwtypeindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputAvailableType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputAvailableType(::core::mem::transmute_copy(&dwoutputstreamid), ::core::mem::transmute_copy(&dwtypeindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetInputType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, ptype: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInputType(::core::mem::transmute_copy(&dwinputstreamid), ::windows::core::from_raw_borrowed(&ptype), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn SetOutputType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, ptype: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputType(::core::mem::transmute_copy(&dwoutputstreamid), ::windows::core::from_raw_borrowed(&ptype), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn GetInputCurrentType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pptype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputCurrentType(::core::mem::transmute_copy(&dwinputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputCurrentType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwoutputstreamid: u32, pptype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputCurrentType(::core::mem::transmute_copy(&dwoutputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetInputStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputStatus(::core::mem::transmute_copy(&dwinputstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputStatus() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetOutputBounds<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hnslowerbound: i64, hnsupperbound: i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputBounds(::core::mem::transmute_copy(&hnslowerbound), ::core::mem::transmute_copy(&hnsupperbound)).into()
}
unsafe extern "system" fn ProcessEvent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, pevent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessEvent(::core::mem::transmute_copy(&dwinputstreamid), ::windows::core::from_raw_borrowed(&pevent)).into()
}
unsafe extern "system" fn ProcessMessage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessMessage(::core::mem::transmute_copy(&emessage), ::core::mem::transmute_copy(&ulparam)).into()
}
unsafe extern "system" fn ProcessInput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTransform_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwinputstreamid: u32, psample: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessInput(::core::mem::transmute_copy(&dwinputstreamid), ::windows::core::from_raw_borrowed(&psample), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn ProcessOutput<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessOutput(::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, Impl, OFFSET>,
GetStreamCount: GetStreamCount::<Identity, Impl, OFFSET>,
GetStreamIDs: GetStreamIDs::<Identity, Impl, OFFSET>,
GetInputStreamInfo: GetInputStreamInfo::<Identity, Impl, OFFSET>,
GetOutputStreamInfo: GetOutputStreamInfo::<Identity, Impl, OFFSET>,
GetAttributes: GetAttributes::<Identity, Impl, OFFSET>,
GetInputStreamAttributes: GetInputStreamAttributes::<Identity, Impl, OFFSET>,
GetOutputStreamAttributes: GetOutputStreamAttributes::<Identity, Impl, OFFSET>,
DeleteInputStream: DeleteInputStream::<Identity, Impl, OFFSET>,
AddInputStreams: AddInputStreams::<Identity, Impl, OFFSET>,
GetInputAvailableType: GetInputAvailableType::<Identity, Impl, OFFSET>,
GetOutputAvailableType: GetOutputAvailableType::<Identity, Impl, OFFSET>,
SetInputType: SetInputType::<Identity, Impl, OFFSET>,
SetOutputType: SetOutputType::<Identity, Impl, OFFSET>,
GetInputCurrentType: GetInputCurrentType::<Identity, Impl, OFFSET>,
GetOutputCurrentType: GetOutputCurrentType::<Identity, Impl, OFFSET>,
GetInputStatus: GetInputStatus::<Identity, Impl, OFFSET>,
GetOutputStatus: GetOutputStatus::<Identity, Impl, OFFSET>,
SetOutputBounds: SetOutputBounds::<Identity, Impl, OFFSET>,
ProcessEvent: ProcessEvent::<Identity, Impl, OFFSET>,
ProcessMessage: ProcessMessage::<Identity, Impl, OFFSET>,
ProcessInput: ProcessInput::<Identity, Impl, OFFSET>,
ProcessOutput: ProcessOutput::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTransform as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFTrustedInput_Impl: Sized {
fn GetInputTrustAuthority(&self, dwstreamid: u32, riid: *const ::windows::core::GUID) -> ::windows::core::Result<::windows::core::IUnknown>;
}
impl ::windows::core::RuntimeName for IMFTrustedInput {}
impl IMFTrustedInput_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTrustedInput_Impl, const OFFSET: isize>() -> IMFTrustedInput_Vtbl {
unsafe extern "system" fn GetInputTrustAuthority<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetInputTrustAuthority(::core::mem::transmute_copy(&dwstreamid), ::core::mem::transmute_copy(&riid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppunkobject, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetInputTrustAuthority: GetInputTrustAuthority::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTrustedInput as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFTrustedOutput_Impl: Sized {
fn GetOutputTrustAuthorityCount(&self) -> ::windows::core::Result<u32>;
fn GetOutputTrustAuthorityByIndex(&self, dwindex: u32) -> ::windows::core::Result<IMFOutputTrustAuthority>;
fn IsFinal(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFTrustedOutput {}
#[cfg(feature = "Win32_Foundation")]
impl IMFTrustedOutput_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTrustedOutput_Impl, const OFFSET: isize>() -> IMFTrustedOutput_Vtbl {
unsafe extern "system" fn GetOutputTrustAuthorityCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTrustedOutput_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcoutputtrustauthorities: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputTrustAuthorityCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcoutputtrustauthorities, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetOutputTrustAuthorityByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTrustedOutput_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwindex: u32, ppauthority: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetOutputTrustAuthorityByIndex(::core::mem::transmute_copy(&dwindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppauthority, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IsFinal<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFTrustedOutput_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfisfinal: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsFinal() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pfisfinal, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetOutputTrustAuthorityCount: GetOutputTrustAuthorityCount::<Identity, Impl, OFFSET>,
GetOutputTrustAuthorityByIndex: GetOutputTrustAuthorityByIndex::<Identity, Impl, OFFSET>,
IsFinal: IsFinal::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFTrustedOutput as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoCaptureSampleAllocator_Impl: Sized + IMFVideoSampleAllocator_Impl {
fn InitializeCaptureSampleAllocator(&self, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: ::core::option::Option<&IMFAttributes>, pmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoCaptureSampleAllocator {}
impl IMFVideoCaptureSampleAllocator_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoCaptureSampleAllocator_Impl, const OFFSET: isize>() -> IMFVideoCaptureSampleAllocator_Vtbl {
unsafe extern "system" fn InitializeCaptureSampleAllocator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeCaptureSampleAllocator(::core::mem::transmute_copy(&cbsamplesize), ::core::mem::transmute_copy(&cbcapturemetadatasize), ::core::mem::transmute_copy(&cbalignment), ::core::mem::transmute_copy(&cminimumsamples), ::windows::core::from_raw_borrowed(&pattributes), ::windows::core::from_raw_borrowed(&pmediatype)).into()
}
Self {
base__: IMFVideoSampleAllocator_Vtbl::new::<Identity, Impl, OFFSET>(),
InitializeCaptureSampleAllocator: InitializeCaptureSampleAllocator::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoCaptureSampleAllocator as ::windows::core::ComInterface>::IID || iid == &<IMFVideoSampleAllocator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoDeviceID_Impl: Sized {
fn GetDeviceID(&self) -> ::windows::core::Result<::windows::core::GUID>;
}
impl ::windows::core::RuntimeName for IMFVideoDeviceID {}
impl IMFVideoDeviceID_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDeviceID_Impl, const OFFSET: isize>() -> IMFVideoDeviceID_Vtbl {
unsafe extern "system" fn GetDeviceID<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDeviceID_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdeviceid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeviceID() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdeviceid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetDeviceID: GetDeviceID::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoDeviceID as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
pub trait IMFVideoDisplayControl_Impl: Sized {
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: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetFullscreen(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
impl ::windows::core::RuntimeName for IMFVideoDisplayControl {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
impl IMFVideoDisplayControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>() -> IMFVideoDisplayControl_Vtbl {
unsafe extern "system" fn GetNativeVideoSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNativeVideoSize(::core::mem::transmute_copy(&pszvideo), ::core::mem::transmute_copy(&pszarvideo)).into()
}
unsafe extern "system" fn GetIdealVideoSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetIdealVideoSize(::core::mem::transmute_copy(&pszmin), ::core::mem::transmute_copy(&pszmax)).into()
}
unsafe extern "system" fn SetVideoPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnrcsource: *const MFVideoNormalizedRect, prcdest: *const super::super::Foundation::RECT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoPosition(::core::mem::transmute_copy(&pnrcsource), ::core::mem::transmute_copy(&prcdest)).into()
}
unsafe extern "system" fn GetVideoPosition<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnrcsource: *mut MFVideoNormalizedRect, prcdest: *mut super::super::Foundation::RECT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoPosition(::core::mem::transmute_copy(&pnrcsource), ::core::mem::transmute_copy(&prcdest)).into()
}
unsafe extern "system" fn SetAspectRatioMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwaspectratiomode: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAspectRatioMode(::core::mem::transmute_copy(&dwaspectratiomode)).into()
}
unsafe extern "system" fn GetAspectRatioMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwaspectratiomode: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAspectRatioMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwaspectratiomode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetVideoWindow<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwndvideo: super::super::Foundation::HWND) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoWindow(::core::mem::transmute_copy(&hwndvideo)).into()
}
unsafe extern "system" fn GetVideoWindow<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, phwndvideo: *mut super::super::Foundation::HWND) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoWindow() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(phwndvideo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RepaintVideo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RepaintVideo().into()
}
unsafe extern "system" fn GetCurrentImage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCurrentImage(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, clr: super::super::Foundation::COLORREF) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBorderColor(::core::mem::transmute_copy(&clr)).into()
}
unsafe extern "system" fn GetBorderColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pclr: *mut super::super::Foundation::COLORREF) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBorderColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pclr, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRenderingPrefs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwrenderflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRenderingPrefs(::core::mem::transmute_copy(&dwrenderflags)).into()
}
unsafe extern "system" fn GetRenderingPrefs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwrenderflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetRenderingPrefs() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwrenderflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetFullscreen<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ffullscreen: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFullscreen(::core::mem::transmute_copy(&ffullscreen)).into()
}
unsafe extern "system" fn GetFullscreen<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pffullscreen: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFullscreen() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pffullscreen, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetNativeVideoSize: GetNativeVideoSize::<Identity, Impl, OFFSET>,
GetIdealVideoSize: GetIdealVideoSize::<Identity, Impl, OFFSET>,
SetVideoPosition: SetVideoPosition::<Identity, Impl, OFFSET>,
GetVideoPosition: GetVideoPosition::<Identity, Impl, OFFSET>,
SetAspectRatioMode: SetAspectRatioMode::<Identity, Impl, OFFSET>,
GetAspectRatioMode: GetAspectRatioMode::<Identity, Impl, OFFSET>,
SetVideoWindow: SetVideoWindow::<Identity, Impl, OFFSET>,
GetVideoWindow: GetVideoWindow::<Identity, Impl, OFFSET>,
RepaintVideo: RepaintVideo::<Identity, Impl, OFFSET>,
GetCurrentImage: GetCurrentImage::<Identity, Impl, OFFSET>,
SetBorderColor: SetBorderColor::<Identity, Impl, OFFSET>,
GetBorderColor: GetBorderColor::<Identity, Impl, OFFSET>,
SetRenderingPrefs: SetRenderingPrefs::<Identity, Impl, OFFSET>,
GetRenderingPrefs: GetRenderingPrefs::<Identity, Impl, OFFSET>,
SetFullscreen: SetFullscreen::<Identity, Impl, OFFSET>,
GetFullscreen: GetFullscreen::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoDisplayControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFVideoMediaType_Impl: Sized + 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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFVideoMediaType {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFVideoMediaType_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMediaType_Impl, const OFFSET: isize>() -> IMFVideoMediaType_Vtbl {
unsafe extern "system" fn GetVideoFormat<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMediaType_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> *mut MFVIDEOFORMAT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoFormat()
}
unsafe extern "system" fn GetVideoRepresentation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoRepresentation(::core::mem::transmute(&guidrepresentation), ::core::mem::transmute_copy(&ppvrepresentation), ::core::mem::transmute_copy(&lstride)).into()
}
Self {
base__: IMFMediaType_Vtbl::new::<Identity, Impl, OFFSET>(),
GetVideoFormat: GetVideoFormat::<Identity, Impl, OFFSET>,
GetVideoRepresentation: GetVideoRepresentation::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoMediaType as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID || iid == &<IMFMediaType as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"Win32_Graphics_Gdi\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
pub trait IMFVideoMixerBitmap_Impl: Sized {
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_Foundation", feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl ::windows::core::RuntimeName for IMFVideoMixerBitmap {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl IMFVideoMixerBitmap_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerBitmap_Impl, const OFFSET: isize>() -> IMFVideoMixerBitmap_Vtbl {
unsafe extern "system" fn SetAlphaBitmap<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbmpparms: *const MFVideoAlphaBitmap) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAlphaBitmap(::core::mem::transmute_copy(&pbmpparms)).into()
}
unsafe extern "system" fn ClearAlphaBitmap<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearAlphaBitmap().into()
}
unsafe extern "system" fn UpdateAlphaBitmapParameters<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbmpparms: *const MFVideoAlphaBitmapParams) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UpdateAlphaBitmapParameters(::core::mem::transmute_copy(&pbmpparms)).into()
}
unsafe extern "system" fn GetAlphaBitmapParameters<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbmpparms: *mut MFVideoAlphaBitmapParams) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAlphaBitmapParameters(::core::mem::transmute_copy(&pbmpparms)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetAlphaBitmap: SetAlphaBitmap::<Identity, Impl, OFFSET>,
ClearAlphaBitmap: ClearAlphaBitmap::<Identity, Impl, OFFSET>,
UpdateAlphaBitmapParameters: UpdateAlphaBitmapParameters::<Identity, Impl, OFFSET>,
GetAlphaBitmapParameters: GetAlphaBitmapParameters::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoMixerBitmap as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoMixerControl_Impl: Sized {
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 ::windows::core::RuntimeName for IMFVideoMixerControl {}
impl IMFVideoMixerControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl_Impl, const OFFSET: isize>() -> IMFVideoMixerControl_Vtbl {
unsafe extern "system" fn SetStreamZOrder<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, dwz: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamZOrder(::core::mem::transmute_copy(&dwstreamid), ::core::mem::transmute_copy(&dwz)).into()
}
unsafe extern "system" fn GetStreamZOrder<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, pdwz: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamZOrder(::core::mem::transmute_copy(&dwstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwz, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetStreamOutputRect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, pnrcoutput: *const MFVideoNormalizedRect) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStreamOutputRect(::core::mem::transmute_copy(&dwstreamid), ::core::mem::transmute_copy(&pnrcoutput)).into()
}
unsafe extern "system" fn GetStreamOutputRect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwstreamid: u32, pnrcoutput: *mut MFVideoNormalizedRect) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetStreamOutputRect(::core::mem::transmute_copy(&dwstreamid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pnrcoutput, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetStreamZOrder: SetStreamZOrder::<Identity, Impl, OFFSET>,
GetStreamZOrder: GetStreamZOrder::<Identity, Impl, OFFSET>,
SetStreamOutputRect: SetStreamOutputRect::<Identity, Impl, OFFSET>,
GetStreamOutputRect: GetStreamOutputRect::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoMixerControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoMixerControl2_Impl: Sized + IMFVideoMixerControl_Impl {
fn SetMixingPrefs(&self, dwmixflags: u32) -> ::windows::core::Result<()>;
fn GetMixingPrefs(&self) -> ::windows::core::Result<u32>;
}
impl ::windows::core::RuntimeName for IMFVideoMixerControl2 {}
impl IMFVideoMixerControl2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl2_Impl, const OFFSET: isize>() -> IMFVideoMixerControl2_Vtbl {
unsafe extern "system" fn SetMixingPrefs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwmixflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMixingPrefs(::core::mem::transmute_copy(&dwmixflags)).into()
}
unsafe extern "system" fn GetMixingPrefs<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoMixerControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwmixflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMixingPrefs() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwmixflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFVideoMixerControl_Vtbl::new::<Identity, Impl, OFFSET>(),
SetMixingPrefs: SetMixingPrefs::<Identity, Impl, OFFSET>,
GetMixingPrefs: GetMixingPrefs::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoMixerControl2 as ::windows::core::ComInterface>::IID || iid == &<IMFVideoMixerControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoPositionMapper_Impl: Sized {
fn MapOutputCoordinateToInputStream(&self, xout: f32, yout: f32, dwoutputstreamindex: u32, dwinputstreamindex: u32, pxin: *mut f32, pyin: *mut f32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoPositionMapper {}
impl IMFVideoPositionMapper_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoPositionMapper_Impl, const OFFSET: isize>() -> IMFVideoPositionMapper_Vtbl {
unsafe extern "system" fn MapOutputCoordinateToInputStream<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MapOutputCoordinateToInputStream(::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, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoPositionMapper as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoPresenter_Impl: Sized + IMFClockStateSink_Impl {
fn ProcessMessage(&self, emessage: MFVP_MESSAGE_TYPE, ulparam: usize) -> ::windows::core::Result<()>;
fn GetCurrentMediaType(&self) -> ::windows::core::Result<IMFVideoMediaType>;
}
impl ::windows::core::RuntimeName for IMFVideoPresenter {}
impl IMFVideoPresenter_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoPresenter_Impl, const OFFSET: isize>() -> IMFVideoPresenter_Vtbl {
unsafe extern "system" fn ProcessMessage<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoPresenter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, emessage: MFVP_MESSAGE_TYPE, ulparam: usize) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessMessage(::core::mem::transmute_copy(&emessage), ::core::mem::transmute_copy(&ulparam)).into()
}
unsafe extern "system" fn GetCurrentMediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoPresenter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediatype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrentMediaType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFClockStateSink_Vtbl::new::<Identity, Impl, OFFSET>(),
ProcessMessage: ProcessMessage::<Identity, Impl, OFFSET>,
GetCurrentMediaType: GetCurrentMediaType::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoPresenter as ::windows::core::ComInterface>::IID || iid == &<IMFClockStateSink as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
pub trait IMFVideoProcessor_Impl: Sized {
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(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl ::windows::core::RuntimeName for IMFVideoProcessor {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))]
impl IMFVideoProcessor_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>() -> IMFVideoProcessor_Vtbl {
unsafe extern "system" fn GetAvailableVideoProcessorModes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lpdwnumprocessingmodes: *mut u32, ppvideoprocessingmodes: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetAvailableVideoProcessorModes(::core::mem::transmute_copy(&lpdwnumprocessingmodes), ::core::mem::transmute_copy(&ppvideoprocessingmodes)).into()
}
unsafe extern "system" fn GetVideoProcessorCaps<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lpvideoprocessormode: *const ::windows::core::GUID, lpvideoprocessorcaps: *mut DXVA2_VideoProcessorCaps) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetVideoProcessorCaps(::core::mem::transmute_copy(&lpvideoprocessormode), ::core::mem::transmute_copy(&lpvideoprocessorcaps)).into()
}
unsafe extern "system" fn GetVideoProcessorMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lpmode: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetVideoProcessorMode() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(lpmode, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetVideoProcessorMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lpmode: *const ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVideoProcessorMode(::core::mem::transmute_copy(&lpmode)).into()
}
unsafe extern "system" fn GetProcAmpRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwproperty: u32, pproprange: *mut DXVA2_ValueRange) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcAmpRange(::core::mem::transmute_copy(&dwproperty)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pproprange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProcAmpValues<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwflags: u32, values: *mut DXVA2_ProcAmpValues) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcAmpValues(::core::mem::transmute_copy(&dwflags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(values, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProcAmpValues<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwflags: u32, pvalues: *const DXVA2_ProcAmpValues) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProcAmpValues(::core::mem::transmute_copy(&dwflags), ::core::mem::transmute_copy(&pvalues)).into()
}
unsafe extern "system" fn GetFilteringRange<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwproperty: u32, pproprange: *mut DXVA2_ValueRange) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFilteringRange(::core::mem::transmute_copy(&dwproperty)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pproprange, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetFilteringValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwproperty: u32, pvalue: *mut DXVA2_Fixed32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFilteringValue(::core::mem::transmute_copy(&dwproperty)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pvalue, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetFilteringValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwproperty: u32, pvalue: *const DXVA2_Fixed32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFilteringValue(::core::mem::transmute_copy(&dwproperty), ::core::mem::transmute_copy(&pvalue)).into()
}
unsafe extern "system" fn GetBackgroundColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lpclrbkg: *mut super::super::Foundation::COLORREF) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetBackgroundColor() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(lpclrbkg, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetBackgroundColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, clrbkg: super::super::Foundation::COLORREF) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBackgroundColor(::core::mem::transmute_copy(&clrbkg)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAvailableVideoProcessorModes: GetAvailableVideoProcessorModes::<Identity, Impl, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, Impl, OFFSET>,
GetVideoProcessorMode: GetVideoProcessorMode::<Identity, Impl, OFFSET>,
SetVideoProcessorMode: SetVideoProcessorMode::<Identity, Impl, OFFSET>,
GetProcAmpRange: GetProcAmpRange::<Identity, Impl, OFFSET>,
GetProcAmpValues: GetProcAmpValues::<Identity, Impl, OFFSET>,
SetProcAmpValues: SetProcAmpValues::<Identity, Impl, OFFSET>,
GetFilteringRange: GetFilteringRange::<Identity, Impl, OFFSET>,
GetFilteringValue: GetFilteringValue::<Identity, Impl, OFFSET>,
SetFilteringValue: SetFilteringValue::<Identity, Impl, OFFSET>,
GetBackgroundColor: GetBackgroundColor::<Identity, Impl, OFFSET>,
SetBackgroundColor: SetBackgroundColor::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoProcessor as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFVideoProcessorControl_Impl: Sized {
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<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFVideoProcessorControl {}
#[cfg(feature = "Win32_Foundation")]
impl IMFVideoProcessorControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>() -> IMFVideoProcessorControl_Vtbl {
unsafe extern "system" fn SetBorderColor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbordercolor: *const MFARGB) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBorderColor(::core::mem::transmute_copy(&pbordercolor)).into()
}
unsafe extern "system" fn SetSourceRectangle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psrcrect: *const super::super::Foundation::RECT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSourceRectangle(::core::mem::transmute_copy(&psrcrect)).into()
}
unsafe extern "system" fn SetDestinationRectangle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdstrect: *const super::super::Foundation::RECT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDestinationRectangle(::core::mem::transmute_copy(&pdstrect)).into()
}
unsafe extern "system" fn SetMirror<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, emirror: MF_VIDEO_PROCESSOR_MIRROR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMirror(::core::mem::transmute_copy(&emirror)).into()
}
unsafe extern "system" fn SetRotation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, erotation: MF_VIDEO_PROCESSOR_ROTATION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRotation(::core::mem::transmute_copy(&erotation)).into()
}
unsafe extern "system" fn SetConstrictionSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pconstrictionsize: *const super::super::Foundation::SIZE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetConstrictionSize(::core::mem::transmute_copy(&pconstrictionsize)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetBorderColor: SetBorderColor::<Identity, Impl, OFFSET>,
SetSourceRectangle: SetSourceRectangle::<Identity, Impl, OFFSET>,
SetDestinationRectangle: SetDestinationRectangle::<Identity, Impl, OFFSET>,
SetMirror: SetMirror::<Identity, Impl, OFFSET>,
SetRotation: SetRotation::<Identity, Impl, OFFSET>,
SetConstrictionSize: SetConstrictionSize::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoProcessorControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFVideoProcessorControl2_Impl: Sized + IMFVideoProcessorControl_Impl {
fn SetRotationOverride(&self, uirotation: u32) -> ::windows::core::Result<()>;
fn EnableHardwareEffects(&self, fenabled: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetSupportedHardwareEffects(&self) -> ::windows::core::Result<u32>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFVideoProcessorControl2 {}
#[cfg(feature = "Win32_Foundation")]
impl IMFVideoProcessorControl2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl2_Impl, const OFFSET: isize>() -> IMFVideoProcessorControl2_Vtbl {
unsafe extern "system" fn SetRotationOverride<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, uirotation: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRotationOverride(::core::mem::transmute_copy(&uirotation)).into()
}
unsafe extern "system" fn EnableHardwareEffects<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenabled: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableHardwareEffects(::core::mem::transmute_copy(&fenabled)).into()
}
unsafe extern "system" fn GetSupportedHardwareEffects<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, puisupport: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetSupportedHardwareEffects() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(puisupport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFVideoProcessorControl_Vtbl::new::<Identity, Impl, OFFSET>(),
SetRotationOverride: SetRotationOverride::<Identity, Impl, OFFSET>,
EnableHardwareEffects: EnableHardwareEffects::<Identity, Impl, OFFSET>,
GetSupportedHardwareEffects: GetSupportedHardwareEffects::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoProcessorControl2 as ::windows::core::ComInterface>::IID || iid == &<IMFVideoProcessorControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IMFVideoProcessorControl3_Impl: Sized + IMFVideoProcessorControl2_Impl {
fn GetNaturalOutputType(&self) -> ::windows::core::Result<IMFMediaType>;
fn EnableSphericalVideoProcessing(&self, fenable: super::super::Foundation::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: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IMFVideoProcessorControl3 {}
#[cfg(feature = "Win32_Foundation")]
impl IMFVideoProcessorControl3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl3_Impl, const OFFSET: isize>() -> IMFVideoProcessorControl3_Vtbl {
unsafe extern "system" fn GetNaturalOutputType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pptype: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetNaturalOutputType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn EnableSphericalVideoProcessing<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fenable: super::super::Foundation::BOOL, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableSphericalVideoProcessing(::core::mem::transmute_copy(&fenable), ::core::mem::transmute_copy(&eformat), ::core::mem::transmute_copy(&eprojectionmode)).into()
}
unsafe extern "system" fn SetSphericalVideoProperties<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, x: f32, y: f32, z: f32, w: f32, fieldofview: f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSphericalVideoProperties(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, poutputdevice: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOutputDevice(::windows::core::from_raw_borrowed(&poutputdevice)).into()
}
Self {
base__: IMFVideoProcessorControl2_Vtbl::new::<Identity, Impl, OFFSET>(),
GetNaturalOutputType: GetNaturalOutputType::<Identity, Impl, OFFSET>,
EnableSphericalVideoProcessing: EnableSphericalVideoProcessing::<Identity, Impl, OFFSET>,
SetSphericalVideoProperties: SetSphericalVideoProperties::<Identity, Impl, OFFSET>,
SetOutputDevice: SetOutputDevice::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoProcessorControl3 as ::windows::core::ComInterface>::IID || iid == &<IMFVideoProcessorControl as ::windows::core::ComInterface>::IID || iid == &<IMFVideoProcessorControl2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoRenderer_Impl: Sized {
fn InitializeRenderer(&self, pvideomixer: ::core::option::Option<&IMFTransform>, pvideopresenter: ::core::option::Option<&IMFVideoPresenter>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoRenderer {}
impl IMFVideoRenderer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoRenderer_Impl, const OFFSET: isize>() -> IMFVideoRenderer_Vtbl {
unsafe extern "system" fn InitializeRenderer<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeRenderer(::windows::core::from_raw_borrowed(&pvideomixer), ::windows::core::from_raw_borrowed(&pvideopresenter)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), InitializeRenderer: InitializeRenderer::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoRenderer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoRendererEffectControl_Impl: Sized {
fn OnAppServiceConnectionEstablished(&self, pappserviceconnection: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoRendererEffectControl {}
impl IMFVideoRendererEffectControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoRendererEffectControl_Impl, const OFFSET: isize>() -> IMFVideoRendererEffectControl_Vtbl {
unsafe extern "system" fn OnAppServiceConnectionEstablished<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoRendererEffectControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pappserviceconnection: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OnAppServiceConnectionEstablished(::windows::core::from_raw_borrowed(&pappserviceconnection)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnAppServiceConnectionEstablished: OnAppServiceConnectionEstablished::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoRendererEffectControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoSampleAllocator_Impl: Sized {
fn SetDirectXManager(&self, pmanager: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn UninitializeSampleAllocator(&self) -> ::windows::core::Result<()>;
fn InitializeSampleAllocator(&self, crequestedframes: u32, pmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
fn AllocateSample(&self) -> ::windows::core::Result<IMFSample>;
}
impl ::windows::core::RuntimeName for IMFVideoSampleAllocator {}
impl IMFVideoSampleAllocator_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocator_Impl, const OFFSET: isize>() -> IMFVideoSampleAllocator_Vtbl {
unsafe extern "system" fn SetDirectXManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmanager: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDirectXManager(::windows::core::from_raw_borrowed(&pmanager)).into()
}
unsafe extern "system" fn UninitializeSampleAllocator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UninitializeSampleAllocator().into()
}
unsafe extern "system" fn InitializeSampleAllocator<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, crequestedframes: u32, pmediatype: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeSampleAllocator(::core::mem::transmute_copy(&crequestedframes), ::windows::core::from_raw_borrowed(&pmediatype)).into()
}
unsafe extern "system" fn AllocateSample<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppsample: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllocateSample() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsample, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDirectXManager: SetDirectXManager::<Identity, Impl, OFFSET>,
UninitializeSampleAllocator: UninitializeSampleAllocator::<Identity, Impl, OFFSET>,
InitializeSampleAllocator: InitializeSampleAllocator::<Identity, Impl, OFFSET>,
AllocateSample: AllocateSample::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoSampleAllocator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoSampleAllocatorCallback_Impl: Sized {
fn SetCallback(&self, pnotify: ::core::option::Option<&IMFVideoSampleAllocatorNotify>) -> ::windows::core::Result<()>;
fn GetFreeSampleCount(&self) -> ::windows::core::Result<i32>;
}
impl ::windows::core::RuntimeName for IMFVideoSampleAllocatorCallback {}
impl IMFVideoSampleAllocatorCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorCallback_Impl, const OFFSET: isize>() -> IMFVideoSampleAllocatorCallback_Vtbl {
unsafe extern "system" fn SetCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnotify: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCallback(::windows::core::from_raw_borrowed(&pnotify)).into()
}
unsafe extern "system" fn GetFreeSampleCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plsamples: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetFreeSampleCount() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(plsamples, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetCallback: SetCallback::<Identity, Impl, OFFSET>,
GetFreeSampleCount: GetFreeSampleCount::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoSampleAllocatorEx_Impl: Sized + IMFVideoSampleAllocator_Impl {
fn InitializeSampleAllocatorEx(&self, cinitialsamples: u32, cmaximumsamples: u32, pattributes: ::core::option::Option<&IMFAttributes>, pmediatype: ::core::option::Option<&IMFMediaType>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoSampleAllocatorEx {}
impl IMFVideoSampleAllocatorEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorEx_Impl, const OFFSET: isize>() -> IMFVideoSampleAllocatorEx_Vtbl {
unsafe extern "system" fn InitializeSampleAllocatorEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InitializeSampleAllocatorEx(::core::mem::transmute_copy(&cinitialsamples), ::core::mem::transmute_copy(&cmaximumsamples), ::windows::core::from_raw_borrowed(&pattributes), ::windows::core::from_raw_borrowed(&pmediatype)).into()
}
Self {
base__: IMFVideoSampleAllocator_Vtbl::new::<Identity, Impl, OFFSET>(),
InitializeSampleAllocatorEx: InitializeSampleAllocatorEx::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorEx as ::windows::core::ComInterface>::IID || iid == &<IMFVideoSampleAllocator as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoSampleAllocatorNotify_Impl: Sized {
fn NotifyRelease(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoSampleAllocatorNotify {}
impl IMFVideoSampleAllocatorNotify_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorNotify_Impl, const OFFSET: isize>() -> IMFVideoSampleAllocatorNotify_Vtbl {
unsafe extern "system" fn NotifyRelease<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorNotify_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyRelease().into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NotifyRelease: NotifyRelease::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFVideoSampleAllocatorNotifyEx_Impl: Sized + IMFVideoSampleAllocatorNotify_Impl {
fn NotifyPrune(&self, __midl__imfvideosampleallocatornotifyex0000: ::core::option::Option<&IMFSample>) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IMFVideoSampleAllocatorNotifyEx {}
impl IMFVideoSampleAllocatorNotifyEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorNotifyEx_Impl, const OFFSET: isize>() -> IMFVideoSampleAllocatorNotifyEx_Vtbl {
unsafe extern "system" fn NotifyPrune<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVideoSampleAllocatorNotifyEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, __midl__imfvideosampleallocatornotifyex0000: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyPrune(::windows::core::from_raw_borrowed(&__midl__imfvideosampleallocatornotifyex0000)).into()
}
Self { base__: IMFVideoSampleAllocatorNotify_Vtbl::new::<Identity, Impl, OFFSET>(), NotifyPrune: NotifyPrune::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorNotifyEx as ::windows::core::ComInterface>::IID || iid == &<IMFVideoSampleAllocatorNotify as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
pub trait IMFVirtualCamera_Impl: Sized + IMFAttributes_Impl {
fn AddDeviceSourceInfo(&self, devicesourceinfo: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn AddProperty(&self, pkey: *const super::super::Devices::Properties::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: ::core::option::Option<&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_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl ::windows::core::RuntimeName for IMFVirtualCamera {}
#[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
impl IMFVirtualCamera_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>() -> IMFVirtualCamera_Vtbl {
unsafe extern "system" fn AddDeviceSourceInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, devicesourceinfo: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddDeviceSourceInfo(::core::mem::transmute(&devicesourceinfo)).into()
}
unsafe extern "system" fn AddProperty<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pkey: *const super::super::Devices::Properties::DEVPROPKEY, r#type: super::super::Devices::Properties::DEVPROPTYPE, pbdata: *const u8, cbdata: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddProperty(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddRegistryEntry(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcallback: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Start(::windows::core::from_raw_borrowed(&pcallback)).into()
}
unsafe extern "system" fn Stop<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove().into()
}
unsafe extern "system" fn GetMediaSource<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppmediasource: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetMediaSource() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmediasource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SendCameraProperty<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SendCameraProperty(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateSyncEvent(::core::mem::transmute_copy(&kseventset), ::core::mem::transmute_copy(&kseventid), ::core::mem::transmute_copy(&kseventflags), ::core::mem::transmute_copy(&eventhandle)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(camerasyncobject, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateSyncSemaphore<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateSyncSemaphore(::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)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(camerasyncobject, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Shutdown<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Shutdown().into()
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, Impl, OFFSET>(),
AddDeviceSourceInfo: AddDeviceSourceInfo::<Identity, Impl, OFFSET>,
AddProperty: AddProperty::<Identity, Impl, OFFSET>,
AddRegistryEntry: AddRegistryEntry::<Identity, Impl, OFFSET>,
Start: Start::<Identity, Impl, OFFSET>,
Stop: Stop::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
GetMediaSource: GetMediaSource::<Identity, Impl, OFFSET>,
SendCameraProperty: SendCameraProperty::<Identity, Impl, OFFSET>,
CreateSyncEvent: CreateSyncEvent::<Identity, Impl, OFFSET>,
CreateSyncSemaphore: CreateSyncSemaphore::<Identity, Impl, OFFSET>,
Shutdown: Shutdown::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFVirtualCamera as ::windows::core::ComInterface>::IID || iid == &<IMFAttributes as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFWorkQueueServices_Impl: Sized {
fn BeginRegisterTopologyWorkQueuesWithMMCSS(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndRegisterTopologyWorkQueuesWithMMCSS(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<()>;
fn BeginUnregisterTopologyWorkQueuesWithMMCSS(&self, pcallback: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndUnregisterTopologyWorkQueuesWithMMCSS(&self, presult: ::core::option::Option<&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: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndRegisterPlatformWorkQueueWithMMCSS(&self, presult: ::core::option::Option<&IMFAsyncResult>) -> ::windows::core::Result<u32>;
fn BeginUnregisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, pcallback: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn EndUnregisterPlatformWorkQueueWithMMCSS(&self, presult: ::core::option::Option<&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 ::windows::core::RuntimeName for IMFWorkQueueServices {}
impl IMFWorkQueueServices_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>() -> IMFWorkQueueServices_Vtbl {
unsafe extern "system" fn BeginRegisterTopologyWorkQueuesWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginRegisterTopologyWorkQueuesWithMMCSS(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndRegisterTopologyWorkQueuesWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndRegisterTopologyWorkQueuesWithMMCSS(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn BeginUnregisterTopologyWorkQueuesWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginUnregisterTopologyWorkQueuesWithMMCSS(::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndUnregisterTopologyWorkQueuesWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndUnregisterTopologyWorkQueuesWithMMCSS(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn GetTopologyWorkQueueMMCSSClass<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwtopologyworkqueueid: u32, pwszclass: ::windows::core::PWSTR, pcchclass: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTopologyWorkQueueMMCSSClass(::core::mem::transmute_copy(&dwtopologyworkqueueid), ::core::mem::transmute_copy(&pwszclass), ::core::mem::transmute_copy(&pcchclass)).into()
}
unsafe extern "system" fn GetTopologyWorkQueueMMCSSTaskId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwtopologyworkqueueid: u32, pdwtaskid: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTopologyWorkQueueMMCSSTaskId(::core::mem::transmute_copy(&dwtopologyworkqueueid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwtaskid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginRegisterPlatformWorkQueueWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginRegisterPlatformWorkQueueWithMMCSS(::core::mem::transmute_copy(&dwplatformworkqueue), ::core::mem::transmute(&wszclass), ::core::mem::transmute_copy(&dwtaskid), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndRegisterPlatformWorkQueueWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void, pdwtaskid: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EndRegisterPlatformWorkQueueWithMMCSS(::windows::core::from_raw_borrowed(&presult)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwtaskid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginUnregisterPlatformWorkQueueWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginUnregisterPlatformWorkQueueWithMMCSS(::core::mem::transmute_copy(&dwplatformworkqueue), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn EndUnregisterPlatformWorkQueueWithMMCSS<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, presult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EndUnregisterPlatformWorkQueueWithMMCSS(::windows::core::from_raw_borrowed(&presult)).into()
}
unsafe extern "system" fn GetPlaftormWorkQueueMMCSSClass<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwplatformworkqueueid: u32, pwszclass: ::windows::core::PWSTR, pcchclass: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPlaftormWorkQueueMMCSSClass(::core::mem::transmute_copy(&dwplatformworkqueueid), ::core::mem::transmute_copy(&pwszclass), ::core::mem::transmute_copy(&pcchclass)).into()
}
unsafe extern "system" fn GetPlatformWorkQueueMMCSSTaskId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwplatformworkqueueid: u32, pdwtaskid: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPlatformWorkQueueMMCSSTaskId(::core::mem::transmute_copy(&dwplatformworkqueueid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwtaskid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginRegisterTopologyWorkQueuesWithMMCSS: BeginRegisterTopologyWorkQueuesWithMMCSS::<Identity, Impl, OFFSET>,
EndRegisterTopologyWorkQueuesWithMMCSS: EndRegisterTopologyWorkQueuesWithMMCSS::<Identity, Impl, OFFSET>,
BeginUnregisterTopologyWorkQueuesWithMMCSS: BeginUnregisterTopologyWorkQueuesWithMMCSS::<Identity, Impl, OFFSET>,
EndUnregisterTopologyWorkQueuesWithMMCSS: EndUnregisterTopologyWorkQueuesWithMMCSS::<Identity, Impl, OFFSET>,
GetTopologyWorkQueueMMCSSClass: GetTopologyWorkQueueMMCSSClass::<Identity, Impl, OFFSET>,
GetTopologyWorkQueueMMCSSTaskId: GetTopologyWorkQueueMMCSSTaskId::<Identity, Impl, OFFSET>,
BeginRegisterPlatformWorkQueueWithMMCSS: BeginRegisterPlatformWorkQueueWithMMCSS::<Identity, Impl, OFFSET>,
EndRegisterPlatformWorkQueueWithMMCSS: EndRegisterPlatformWorkQueueWithMMCSS::<Identity, Impl, OFFSET>,
BeginUnregisterPlatformWorkQueueWithMMCSS: BeginUnregisterPlatformWorkQueueWithMMCSS::<Identity, Impl, OFFSET>,
EndUnregisterPlatformWorkQueueWithMMCSS: EndUnregisterPlatformWorkQueueWithMMCSS::<Identity, Impl, OFFSET>,
GetPlaftormWorkQueueMMCSSClass: GetPlaftormWorkQueueMMCSSClass::<Identity, Impl, OFFSET>,
GetPlatformWorkQueueMMCSSTaskId: GetPlatformWorkQueueMMCSSTaskId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFWorkQueueServices as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IMFWorkQueueServicesEx_Impl: Sized + 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: ::core::option::Option<&IMFAsyncCallback>, pstate: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn GetPlatformWorkQueueMMCSSPriority(&self, dwplatformworkqueueid: u32) -> ::windows::core::Result<i32>;
}
impl ::windows::core::RuntimeName for IMFWorkQueueServicesEx {}
impl IMFWorkQueueServicesEx_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>() -> IMFWorkQueueServicesEx_Vtbl {
unsafe extern "system" fn GetTopologyWorkQueueMMCSSPriority<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwtopologyworkqueueid: u32, plpriority: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTopologyWorkQueueMMCSSPriority(::core::mem::transmute_copy(&dwtopologyworkqueueid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(plpriority, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BeginRegisterPlatformWorkQueueWithMMCSSEx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BeginRegisterPlatformWorkQueueWithMMCSSEx(::core::mem::transmute_copy(&dwplatformworkqueue), ::core::mem::transmute(&wszclass), ::core::mem::transmute_copy(&dwtaskid), ::core::mem::transmute_copy(&lpriority), ::windows::core::from_raw_borrowed(&pcallback), ::windows::core::from_raw_borrowed(&pstate)).into()
}
unsafe extern "system" fn GetPlatformWorkQueueMMCSSPriority<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwplatformworkqueueid: u32, plpriority: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetPlatformWorkQueueMMCSSPriority(::core::mem::transmute_copy(&dwplatformworkqueueid)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(plpriority, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: IMFWorkQueueServices_Vtbl::new::<Identity, Impl, OFFSET>(),
GetTopologyWorkQueueMMCSSPriority: GetTopologyWorkQueueMMCSSPriority::<Identity, Impl, OFFSET>,
BeginRegisterPlatformWorkQueueWithMMCSSEx: BeginRegisterPlatformWorkQueueWithMMCSSEx::<Identity, Impl, OFFSET>,
GetPlatformWorkQueueMMCSSPriority: GetPlatformWorkQueueMMCSSPriority::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IMFWorkQueueServicesEx as ::windows::core::ComInterface>::IID || iid == &<IMFWorkQueueServices as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IOPMVideoOutput_Impl: Sized {
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 ::windows::core::RuntimeName for IOPMVideoOutput {}
impl IOPMVideoOutput_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IOPMVideoOutput_Impl, const OFFSET: isize>() -> IOPMVideoOutput_Vtbl {
unsafe extern "system" fn StartInitialization<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StartInitialization(::core::mem::transmute_copy(&prnrandomnumber), ::core::mem::transmute_copy(&ppbcertificate), ::core::mem::transmute_copy(&pulcertificatelength)).into()
}
unsafe extern "system" fn FinishInitialization<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pparameters: *const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FinishInitialization(::core::mem::transmute_copy(&pparameters)).into()
}
unsafe extern "system" fn GetInformation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetInformation(::core::mem::transmute_copy(&pparameters), ::core::mem::transmute_copy(&prequestedinformation)).into()
}
unsafe extern "system" fn COPPCompatibleGetInformation<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.COPPCompatibleGetInformation(::core::mem::transmute_copy(&pparameters), ::core::mem::transmute_copy(&prequestedinformation)).into()
}
unsafe extern "system" fn Configure<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pparameters: *const OPM_CONFIGURE_PARAMETERS, uladditionalparameterssize: u32, pbadditionalparameters: *const u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Configure(::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, Impl, OFFSET>,
FinishInitialization: FinishInitialization::<Identity, Impl, OFFSET>,
GetInformation: GetInformation::<Identity, Impl, OFFSET>,
COPPCompatibleGetInformation: COPPCompatibleGetInformation::<Identity, Impl, OFFSET>,
Configure: Configure::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IOPMVideoOutput as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IPlayToControl_Impl: Sized {
fn Connect(&self, pfactory: ::core::option::Option<&IMFSharingEngineClassFactory>) -> ::windows::core::Result<()>;
fn Disconnect(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IPlayToControl {}
impl IPlayToControl_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPlayToControl_Impl, const OFFSET: isize>() -> IPlayToControl_Vtbl {
unsafe extern "system" fn Connect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPlayToControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfactory: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Connect(::windows::core::from_raw_borrowed(&pfactory)).into()
}
unsafe extern "system" fn Disconnect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPlayToControl_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Disconnect().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Connect: Connect::<Identity, Impl, OFFSET>,
Disconnect: Disconnect::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IPlayToControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IPlayToControlWithCapabilities_Impl: Sized + IPlayToControl_Impl {
fn GetCapabilities(&self) -> ::windows::core::Result<PLAYTO_SOURCE_CREATEFLAGS>;
}
impl ::windows::core::RuntimeName for IPlayToControlWithCapabilities {}
impl IPlayToControlWithCapabilities_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPlayToControlWithCapabilities_Impl, const OFFSET: isize>() -> IPlayToControlWithCapabilities_Vtbl {
unsafe extern "system" fn GetCapabilities<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPlayToControlWithCapabilities_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcapabilities: *mut PLAYTO_SOURCE_CREATEFLAGS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCapabilities() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pcapabilities, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: IPlayToControl_Vtbl::new::<Identity, Impl, OFFSET>(), GetCapabilities: GetCapabilities::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IPlayToControlWithCapabilities as ::windows::core::ComInterface>::IID || iid == &<IPlayToControl as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IPlayToSourceClassFactory_Impl: Sized {
fn CreateInstance(&self, dwflags: u32, pcontrol: ::core::option::Option<&IPlayToControl>) -> ::windows::core::Result<::windows::core::IInspectable>;
}
impl ::windows::core::RuntimeName for IPlayToSourceClassFactory {}
impl IPlayToSourceClassFactory_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPlayToSourceClassFactory_Impl, const OFFSET: isize>() -> IPlayToSourceClassFactory_Vtbl {
unsafe extern "system" fn CreateInstance<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateInstance(::core::mem::transmute_copy(&dwflags), ::windows::core::from_raw_borrowed(&pcontrol)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppsource, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IPlayToSourceClassFactory as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IToc_Impl: Sized {
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: ::core::option::Option<&ITocEntryList>, pwentrylistindex: *mut u16) -> ::windows::core::Result<()>;
fn AddEntryListByIndex(&self, wentrylistindex: u16, pentrylist: ::core::option::Option<&ITocEntryList>) -> ::windows::core::Result<()>;
fn RemoveEntryListByIndex(&self, wentrylistindex: u16) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IToc {}
impl IToc_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>() -> IToc_Vtbl {
unsafe extern "system" fn SetDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdescriptor: *mut TOC_DESCRIPTOR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDescriptor(::core::mem::transmute_copy(&pdescriptor)).into()
}
unsafe extern "system" fn GetDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdescriptor: *mut TOC_DESCRIPTOR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDescriptor(::core::mem::transmute_copy(&pdescriptor)).into()
}
unsafe extern "system" fn SetDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszdescription: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDescription(::core::mem::transmute(&pwszdescription)).into()
}
unsafe extern "system" fn GetDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwdescriptionsize: *mut u16, pwszdescription: ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDescription(::core::mem::transmute_copy(&pwdescriptionsize), ::core::mem::transmute_copy(&pwszdescription)).into()
}
unsafe extern "system" fn SetContext<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwcontextsize: u32, pbtcontext: *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetContext(::core::mem::transmute_copy(&dwcontextsize), ::core::mem::transmute_copy(&pbtcontext)).into()
}
unsafe extern "system" fn GetContext<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwcontextsize: *mut u32, pbtcontext: *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetContext(::core::mem::transmute_copy(&pdwcontextsize), ::core::mem::transmute_copy(&pbtcontext)).into()
}
unsafe extern "system" fn GetEntryListCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwcount: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEntryListCount(::core::mem::transmute_copy(&pwcount)).into()
}
unsafe extern "system" fn GetEntryListByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wentrylistindex: u16, ppentrylist: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEntryListByIndex(::core::mem::transmute_copy(&wentrylistindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppentrylist, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddEntryList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pentrylist: *mut ::core::ffi::c_void, pwentrylistindex: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEntryList(::windows::core::from_raw_borrowed(&pentrylist), ::core::mem::transmute_copy(&pwentrylistindex)).into()
}
unsafe extern "system" fn AddEntryListByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wentrylistindex: u16, pentrylist: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEntryListByIndex(::core::mem::transmute_copy(&wentrylistindex), ::windows::core::from_raw_borrowed(&pentrylist)).into()
}
unsafe extern "system" fn RemoveEntryListByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IToc_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wentrylistindex: u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveEntryListByIndex(::core::mem::transmute_copy(&wentrylistindex)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDescriptor: SetDescriptor::<Identity, Impl, OFFSET>,
GetDescriptor: GetDescriptor::<Identity, Impl, OFFSET>,
SetDescription: SetDescription::<Identity, Impl, OFFSET>,
GetDescription: GetDescription::<Identity, Impl, OFFSET>,
SetContext: SetContext::<Identity, Impl, OFFSET>,
GetContext: GetContext::<Identity, Impl, OFFSET>,
GetEntryListCount: GetEntryListCount::<Identity, Impl, OFFSET>,
GetEntryListByIndex: GetEntryListByIndex::<Identity, Impl, OFFSET>,
AddEntryList: AddEntryList::<Identity, Impl, OFFSET>,
AddEntryListByIndex: AddEntryListByIndex::<Identity, Impl, OFFSET>,
RemoveEntryListByIndex: RemoveEntryListByIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IToc as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait ITocCollection_Impl: Sized {
fn GetEntryCount(&self, pdwentrycount: *mut u32) -> ::windows::core::Result<()>;
fn GetEntryByIndex(&self, dwentryindex: u32) -> ::windows::core::Result<IToc>;
fn AddEntry(&self, ptoc: ::core::option::Option<&IToc>, pdwentryindex: *mut u32) -> ::windows::core::Result<()>;
fn AddEntryByIndex(&self, dwentryindex: u32, ptoc: ::core::option::Option<&IToc>) -> ::windows::core::Result<()>;
fn RemoveEntryByIndex(&self, dwentryindex: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ITocCollection {}
impl ITocCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocCollection_Impl, const OFFSET: isize>() -> ITocCollection_Vtbl {
unsafe extern "system" fn GetEntryCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwentrycount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEntryCount(::core::mem::transmute_copy(&pdwentrycount)).into()
}
unsafe extern "system" fn GetEntryByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwentryindex: u32, pptoc: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEntryByIndex(::core::mem::transmute_copy(&dwentryindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptoc, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddEntry<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptoc: *mut ::core::ffi::c_void, pdwentryindex: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEntry(::windows::core::from_raw_borrowed(&ptoc), ::core::mem::transmute_copy(&pdwentryindex)).into()
}
unsafe extern "system" fn AddEntryByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwentryindex: u32, ptoc: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEntryByIndex(::core::mem::transmute_copy(&dwentryindex), ::windows::core::from_raw_borrowed(&ptoc)).into()
}
unsafe extern "system" fn RemoveEntryByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwentryindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveEntryByIndex(::core::mem::transmute_copy(&dwentryindex)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEntryCount: GetEntryCount::<Identity, Impl, OFFSET>,
GetEntryByIndex: GetEntryByIndex::<Identity, Impl, OFFSET>,
AddEntry: AddEntry::<Identity, Impl, OFFSET>,
AddEntryByIndex: AddEntryByIndex::<Identity, Impl, OFFSET>,
RemoveEntryByIndex: RemoveEntryByIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ITocCollection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait ITocEntry_Impl: Sized {
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 ::windows::core::RuntimeName for ITocEntry {}
impl ITocEntry_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>() -> ITocEntry_Vtbl {
unsafe extern "system" fn SetTitle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwsztitle: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTitle(::core::mem::transmute(&pwsztitle)).into()
}
unsafe extern "system" fn GetTitle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwtitlesize: *mut u16, pwsztitle: ::windows::core::PWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTitle(::core::mem::transmute_copy(&pwtitlesize), ::core::mem::transmute_copy(&pwsztitle)).into()
}
unsafe extern "system" fn SetDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDescriptor(::core::mem::transmute_copy(&pdescriptor)).into()
}
unsafe extern "system" fn GetDescriptor<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDescriptor(::core::mem::transmute_copy(&pdescriptor)).into()
}
unsafe extern "system" fn SetSubEntries<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwnumsubentries: u32, pwsubentryindices: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSubEntries(::core::mem::transmute_copy(&dwnumsubentries), ::core::mem::transmute_copy(&pwsubentryindices)).into()
}
unsafe extern "system" fn GetSubEntries<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwnumsubentries: *mut u32, pwsubentryindices: *mut u16) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetSubEntries(::core::mem::transmute_copy(&pdwnumsubentries), ::core::mem::transmute_copy(&pwsubentryindices)).into()
}
unsafe extern "system" fn SetDescriptionData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntry_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwdescriptiondatasize: u32, pbtdescriptiondata: *mut u8, pguidtype: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDescriptionData(::core::mem::transmute_copy(&dwdescriptiondatasize), ::core::mem::transmute_copy(&pbtdescriptiondata), ::core::mem::transmute_copy(&pguidtype)).into()
}
unsafe extern "system" fn GetDescriptionData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDescriptionData(::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, Impl, OFFSET>,
GetTitle: GetTitle::<Identity, Impl, OFFSET>,
SetDescriptor: SetDescriptor::<Identity, Impl, OFFSET>,
GetDescriptor: GetDescriptor::<Identity, Impl, OFFSET>,
SetSubEntries: SetSubEntries::<Identity, Impl, OFFSET>,
GetSubEntries: GetSubEntries::<Identity, Impl, OFFSET>,
SetDescriptionData: SetDescriptionData::<Identity, Impl, OFFSET>,
GetDescriptionData: GetDescriptionData::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ITocEntry as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait ITocEntryList_Impl: Sized {
fn GetEntryCount(&self, pdwentrycount: *mut u32) -> ::windows::core::Result<()>;
fn GetEntryByIndex(&self, dwentryindex: u32) -> ::windows::core::Result<ITocEntry>;
fn AddEntry(&self, pentry: ::core::option::Option<&ITocEntry>, pdwentryindex: *mut u32) -> ::windows::core::Result<()>;
fn AddEntryByIndex(&self, dwentryindex: u32, pentry: ::core::option::Option<&ITocEntry>) -> ::windows::core::Result<()>;
fn RemoveEntryByIndex(&self, dwentryindex: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ITocEntryList {}
impl ITocEntryList_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntryList_Impl, const OFFSET: isize>() -> ITocEntryList_Vtbl {
unsafe extern "system" fn GetEntryCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntryList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwentrycount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetEntryCount(::core::mem::transmute_copy(&pdwentrycount)).into()
}
unsafe extern "system" fn GetEntryByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntryList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwentryindex: u32, ppentry: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetEntryByIndex(::core::mem::transmute_copy(&dwentryindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppentry, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddEntry<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntryList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pentry: *mut ::core::ffi::c_void, pdwentryindex: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEntry(::windows::core::from_raw_borrowed(&pentry), ::core::mem::transmute_copy(&pdwentryindex)).into()
}
unsafe extern "system" fn AddEntryByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntryList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwentryindex: u32, pentry: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddEntryByIndex(::core::mem::transmute_copy(&dwentryindex), ::windows::core::from_raw_borrowed(&pentry)).into()
}
unsafe extern "system" fn RemoveEntryByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocEntryList_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwentryindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveEntryByIndex(::core::mem::transmute_copy(&dwentryindex)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEntryCount: GetEntryCount::<Identity, Impl, OFFSET>,
GetEntryByIndex: GetEntryByIndex::<Identity, Impl, OFFSET>,
AddEntry: AddEntry::<Identity, Impl, OFFSET>,
AddEntryByIndex: AddEntryByIndex::<Identity, Impl, OFFSET>,
RemoveEntryByIndex: RemoveEntryByIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ITocEntryList as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait ITocParser_Impl: Sized {
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: ::core::option::Option<&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 ::windows::core::RuntimeName for ITocParser {}
impl ITocParser_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocParser_Impl, const OFFSET: isize>() -> ITocParser_Vtbl {
unsafe extern "system" fn Init<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocParser_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwszfilename: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Init(::core::mem::transmute(&pwszfilename)).into()
}
unsafe extern "system" fn GetTocCount<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocParser_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, pdwtoccount: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetTocCount(::core::mem::transmute_copy(&enumtocpostype), ::core::mem::transmute_copy(&pdwtoccount)).into()
}
unsafe extern "system" fn GetTocByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTocByIndex(::core::mem::transmute_copy(&enumtocpostype), ::core::mem::transmute_copy(&dwtocindex)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptoc, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetTocByType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetTocByType(::core::mem::transmute_copy(&enumtocpostype), ::core::mem::transmute(&guidtoctype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pptocs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddToc<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddToc(::core::mem::transmute_copy(&enumtocpostype), ::windows::core::from_raw_borrowed(&ptoc), ::core::mem::transmute_copy(&pdwtocindex)).into()
}
unsafe extern "system" fn RemoveTocByIndex<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocParser_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveTocByIndex(::core::mem::transmute_copy(&enumtocpostype), ::core::mem::transmute_copy(&dwtocindex)).into()
}
unsafe extern "system" fn RemoveTocByType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocParser_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, guidtoctype: ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveTocByType(::core::mem::transmute_copy(&enumtocpostype), ::core::mem::transmute(&guidtoctype)).into()
}
unsafe extern "system" fn Commit<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ITocParser_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Commit().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Init: Init::<Identity, Impl, OFFSET>,
GetTocCount: GetTocCount::<Identity, Impl, OFFSET>,
GetTocByIndex: GetTocByIndex::<Identity, Impl, OFFSET>,
GetTocByType: GetTocByType::<Identity, Impl, OFFSET>,
AddToc: AddToc::<Identity, Impl, OFFSET>,
RemoveTocByIndex: RemoveTocByIndex::<Identity, Impl, OFFSET>,
RemoveTocByType: RemoveTocByType::<Identity, Impl, OFFSET>,
Commit: Commit::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ITocParser as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IValidateBinding_Impl: Sized {
fn GetIdentifier(&self, guidlicensorid: &::windows::core::GUID, pbephemeron: *const u8, cbephemeron: u32, ppbblobvalidationid: *mut *mut u8, pcbblobsize: *mut u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IValidateBinding {}
impl IValidateBinding_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IValidateBinding_Impl, const OFFSET: isize>() -> IValidateBinding_Vtbl {
unsafe extern "system" fn GetIdentifier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetIdentifier(::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, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IValidateBinding as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMCodecLeakyBucket_Impl: Sized {
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 ::windows::core::RuntimeName for IWMCodecLeakyBucket {}
impl IWMCodecLeakyBucket_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecLeakyBucket_Impl, const OFFSET: isize>() -> IWMCodecLeakyBucket_Vtbl {
unsafe extern "system" fn SetBufferSizeBits<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ulbuffersize: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBufferSizeBits(::core::mem::transmute_copy(&ulbuffersize)).into()
}
unsafe extern "system" fn GetBufferSizeBits<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pulbuffersize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetBufferSizeBits(::core::mem::transmute_copy(&pulbuffersize)).into()
}
unsafe extern "system" fn SetBufferFullnessBits<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ulbufferfullness: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBufferFullnessBits(::core::mem::transmute_copy(&ulbufferfullness)).into()
}
unsafe extern "system" fn GetBufferFullnessBits<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pulbufferfullness: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetBufferFullnessBits(::core::mem::transmute_copy(&pulbufferfullness)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetBufferSizeBits: SetBufferSizeBits::<Identity, Impl, OFFSET>,
GetBufferSizeBits: GetBufferSizeBits::<Identity, Impl, OFFSET>,
SetBufferFullnessBits: SetBufferFullnessBits::<Identity, Impl, OFFSET>,
GetBufferFullnessBits: GetBufferFullnessBits::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMCodecLeakyBucket as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMCodecOutputTimestamp_Impl: Sized {
fn GetNextOutputTime(&self, prttime: *mut i64) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMCodecOutputTimestamp {}
impl IWMCodecOutputTimestamp_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecOutputTimestamp_Impl, const OFFSET: isize>() -> IWMCodecOutputTimestamp_Vtbl {
unsafe extern "system" fn GetNextOutputTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecOutputTimestamp_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, prttime: *mut i64) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetNextOutputTime(::core::mem::transmute_copy(&prttime)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetNextOutputTime: GetNextOutputTime::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMCodecOutputTimestamp as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Media_DxMediaObjects\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
pub trait IWMCodecPrivateData_Impl: Sized {
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(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
impl ::windows::core::RuntimeName for IWMCodecPrivateData {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
impl IWMCodecPrivateData_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecPrivateData_Impl, const OFFSET: isize>() -> IWMCodecPrivateData_Vtbl {
unsafe extern "system" fn SetPartialOutputType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecPrivateData_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPartialOutputType(::core::mem::transmute_copy(&pmt)).into()
}
unsafe extern "system" fn GetPrivateData<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecPrivateData_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbdata: *mut u8, pcbdata: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetPrivateData(::core::mem::transmute_copy(&pbdata), ::core::mem::transmute_copy(&pcbdata)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetPartialOutputType: SetPartialOutputType::<Identity, Impl, OFFSET>,
GetPrivateData: GetPrivateData::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMCodecPrivateData as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Media_DxMediaObjects\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
pub trait IWMCodecProps_Impl: Sized {
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(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
impl ::windows::core::RuntimeName for IWMCodecProps {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
impl IWMCodecProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecProps_Impl, const OFFSET: isize>() -> IWMCodecProps_Vtbl {
unsafe extern "system" fn GetFormatProp<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetFormatProp(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCodecProp(::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, Impl, OFFSET>,
GetCodecProp: GetCodecProp::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMCodecProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"Win32_Media_DxMediaObjects\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
pub trait IWMCodecStrings_Impl: Sized {
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(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
impl ::windows::core::RuntimeName for IWMCodecStrings {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))]
impl IWMCodecStrings_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMCodecStrings_Impl, const OFFSET: isize>() -> IWMCodecStrings_Vtbl {
unsafe extern "system" fn GetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetName(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetDescription(::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, Impl, OFFSET>,
GetDescription: GetDescription::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMCodecStrings as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMColorConvProps_Impl: Sized {
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 ::windows::core::RuntimeName for IWMColorConvProps {}
impl IWMColorConvProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMColorConvProps_Impl, const OFFSET: isize>() -> IWMColorConvProps_Vtbl {
unsafe extern "system" fn SetMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMColorConvProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lmode: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMode(::core::mem::transmute_copy(&lmode)).into()
}
unsafe extern "system" fn SetFullCroppingParam<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFullCroppingParam(::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, Impl, OFFSET>,
SetFullCroppingParam: SetFullCroppingParam::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMColorConvProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMColorLegalizerProps_Impl: Sized {
fn SetColorLegalizerQuality(&self, lquality: i32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMColorLegalizerProps {}
impl IWMColorLegalizerProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMColorLegalizerProps_Impl, const OFFSET: isize>() -> IWMColorLegalizerProps_Vtbl {
unsafe extern "system" fn SetColorLegalizerQuality<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMColorLegalizerProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lquality: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetColorLegalizerQuality(::core::mem::transmute_copy(&lquality)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetColorLegalizerQuality: SetColorLegalizerQuality::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMColorLegalizerProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IWMFrameInterpProps_Impl: Sized {
fn SetFrameRateIn(&self, lframerate: i32, lscale: i32) -> ::windows::core::Result<()>;
fn SetFrameRateOut(&self, lframerate: i32, lscale: i32) -> ::windows::core::Result<()>;
fn SetFrameInterpEnabled(&self, bfienabled: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
fn SetComplexityLevel(&self, icomplexity: i32) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IWMFrameInterpProps {}
#[cfg(feature = "Win32_Foundation")]
impl IWMFrameInterpProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMFrameInterpProps_Impl, const OFFSET: isize>() -> IWMFrameInterpProps_Vtbl {
unsafe extern "system" fn SetFrameRateIn<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lframerate: i32, lscale: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFrameRateIn(::core::mem::transmute_copy(&lframerate), ::core::mem::transmute_copy(&lscale)).into()
}
unsafe extern "system" fn SetFrameRateOut<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lframerate: i32, lscale: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFrameRateOut(::core::mem::transmute_copy(&lframerate), ::core::mem::transmute_copy(&lscale)).into()
}
unsafe extern "system" fn SetFrameInterpEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bfienabled: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFrameInterpEnabled(::core::mem::transmute_copy(&bfienabled)).into()
}
unsafe extern "system" fn SetComplexityLevel<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, icomplexity: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetComplexityLevel(::core::mem::transmute_copy(&icomplexity)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetFrameRateIn: SetFrameRateIn::<Identity, Impl, OFFSET>,
SetFrameRateOut: SetFrameRateOut::<Identity, Impl, OFFSET>,
SetFrameInterpEnabled: SetFrameInterpEnabled::<Identity, Impl, OFFSET>,
SetComplexityLevel: SetComplexityLevel::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMFrameInterpProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMInterlaceProps_Impl: Sized {
fn SetProcessType(&self, iprocesstype: i32) -> ::windows::core::Result<()>;
fn SetInitInverseTeleCinePattern(&self, iinitpattern: i32) -> ::windows::core::Result<()>;
fn SetLastFrame(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMInterlaceProps {}
impl IWMInterlaceProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMInterlaceProps_Impl, const OFFSET: isize>() -> IWMInterlaceProps_Vtbl {
unsafe extern "system" fn SetProcessType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMInterlaceProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, iprocesstype: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProcessType(::core::mem::transmute_copy(&iprocesstype)).into()
}
unsafe extern "system" fn SetInitInverseTeleCinePattern<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMInterlaceProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, iinitpattern: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInitInverseTeleCinePattern(::core::mem::transmute_copy(&iinitpattern)).into()
}
unsafe extern "system" fn SetLastFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMInterlaceProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLastFrame().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetProcessType: SetProcessType::<Identity, Impl, OFFSET>,
SetInitInverseTeleCinePattern: SetInitInverseTeleCinePattern::<Identity, Impl, OFFSET>,
SetLastFrame: SetLastFrame::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMInterlaceProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMResamplerProps_Impl: Sized {
fn SetHalfFilterLength(&self, lhalffilterlen: i32) -> ::windows::core::Result<()>;
fn SetUserChannelMtx(&self, userchannelmtx: *mut f32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMResamplerProps {}
impl IWMResamplerProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResamplerProps_Impl, const OFFSET: isize>() -> IWMResamplerProps_Vtbl {
unsafe extern "system" fn SetHalfFilterLength<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResamplerProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lhalffilterlen: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHalfFilterLength(::core::mem::transmute_copy(&lhalffilterlen)).into()
}
unsafe extern "system" fn SetUserChannelMtx<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResamplerProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, userchannelmtx: *mut f32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUserChannelMtx(::core::mem::transmute_copy(&userchannelmtx)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetHalfFilterLength: SetHalfFilterLength::<Identity, Impl, OFFSET>,
SetUserChannelMtx: SetUserChannelMtx::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMResamplerProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMResizerProps_Impl: Sized {
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 ::windows::core::RuntimeName for IWMResizerProps {}
impl IWMResizerProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResizerProps_Impl, const OFFSET: isize>() -> IWMResizerProps_Vtbl {
unsafe extern "system" fn SetResizerQuality<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lquality: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetResizerQuality(::core::mem::transmute_copy(&lquality)).into()
}
unsafe extern "system" fn SetInterlaceMode<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lmode: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInterlaceMode(::core::mem::transmute_copy(&lmode)).into()
}
unsafe extern "system" fn SetClipRegion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetClipRegion(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFullCropRegion(::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: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: 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 {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetFullCropRegion(::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, Impl, OFFSET>,
SetInterlaceMode: SetInterlaceMode::<Identity, Impl, OFFSET>,
SetClipRegion: SetClipRegion::<Identity, Impl, OFFSET>,
SetFullCropRegion: SetFullCropRegion::<Identity, Impl, OFFSET>,
GetFullCropRegion: GetFullCropRegion::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMResizerProps as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IWMSampleExtensionSupport_Impl: Sized {
fn SetUseSampleExtensions(&self, fuseextensions: super::super::Foundation::BOOL) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IWMSampleExtensionSupport {}
#[cfg(feature = "Win32_Foundation")]
impl IWMSampleExtensionSupport_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMSampleExtensionSupport_Impl, const OFFSET: isize>() -> IWMSampleExtensionSupport_Vtbl {
unsafe extern "system" fn SetUseSampleExtensions<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMSampleExtensionSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, fuseextensions: super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUseSampleExtensions(::core::mem::transmute_copy(&fuseextensions)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetUseSampleExtensions: SetUseSampleExtensions::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMSampleExtensionSupport as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMValidate_Impl: Sized {
fn SetIdentifier(&self, guidvalidationid: &::windows::core::GUID) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMValidate {}
impl IWMValidate_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMValidate_Impl, const OFFSET: isize>() -> IWMValidate_Vtbl {
unsafe extern "system" fn SetIdentifier<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMValidate_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidvalidationid: ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIdentifier(::core::mem::transmute(&guidvalidationid)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetIdentifier: SetIdentifier::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMValidate as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMVideoDecoderHurryup_Impl: Sized {
fn SetHurryup(&self, lhurryup: i32) -> ::windows::core::Result<()>;
fn GetHurryup(&self, plhurryup: *mut i32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMVideoDecoderHurryup {}
impl IWMVideoDecoderHurryup_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderHurryup_Impl, const OFFSET: isize>() -> IWMVideoDecoderHurryup_Vtbl {
unsafe extern "system" fn SetHurryup<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderHurryup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lhurryup: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHurryup(::core::mem::transmute_copy(&lhurryup)).into()
}
unsafe extern "system" fn GetHurryup<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderHurryup_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, plhurryup: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetHurryup(::core::mem::transmute_copy(&plhurryup)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetHurryup: SetHurryup::<Identity, Impl, OFFSET>,
GetHurryup: GetHurryup::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMVideoDecoderHurryup as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"Win32_Media_DxMediaObjects\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub trait IWMVideoDecoderReconBuffer_Impl: Sized {
fn GetReconstructedVideoFrameSize(&self, pdwsize: *mut u32) -> ::windows::core::Result<()>;
fn GetReconstructedVideoFrame(&self, pbuf: ::core::option::Option<&super::DxMediaObjects::IMediaBuffer>) -> ::windows::core::Result<()>;
fn SetReconstructedVideoFrame(&self, pbuf: ::core::option::Option<&super::DxMediaObjects::IMediaBuffer>) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl ::windows::core::RuntimeName for IWMVideoDecoderReconBuffer {}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl IWMVideoDecoderReconBuffer_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>() -> IWMVideoDecoderReconBuffer_Vtbl {
unsafe extern "system" fn GetReconstructedVideoFrameSize<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwsize: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetReconstructedVideoFrameSize(::core::mem::transmute_copy(&pdwsize)).into()
}
unsafe extern "system" fn GetReconstructedVideoFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbuf: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetReconstructedVideoFrame(::windows::core::from_raw_borrowed(&pbuf)).into()
}
unsafe extern "system" fn SetReconstructedVideoFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbuf: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetReconstructedVideoFrame(::windows::core::from_raw_borrowed(&pbuf)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetReconstructedVideoFrameSize: GetReconstructedVideoFrameSize::<Identity, Impl, OFFSET>,
GetReconstructedVideoFrame: GetReconstructedVideoFrame::<Identity, Impl, OFFSET>,
SetReconstructedVideoFrame: SetReconstructedVideoFrame::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMVideoDecoderReconBuffer as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait IWMVideoForceKeyFrame_Impl: Sized {
fn SetKeyFrame(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IWMVideoForceKeyFrame {}
impl IWMVideoForceKeyFrame_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoForceKeyFrame_Impl, const OFFSET: isize>() -> IWMVideoForceKeyFrame_Vtbl {
unsafe extern "system" fn SetKeyFrame<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWMVideoForceKeyFrame_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetKeyFrame().into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetKeyFrame: SetKeyFrame::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IWMVideoForceKeyFrame as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_Media_MediaFoundation\"`, `\"implement\"`*"]
pub trait MFASYNCRESULT_Impl: Sized + IMFAsyncResult_Impl {}
impl ::windows::core::RuntimeName for MFASYNCRESULT {}
impl MFASYNCRESULT_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: MFASYNCRESULT_Impl, const OFFSET: isize>() -> MFASYNCRESULT_Vtbl {
Self { base__: IMFAsyncResult_Vtbl::new::<Identity, Impl, OFFSET>() }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<MFASYNCRESULT as ::windows::core::ComInterface>::IID || iid == &<IMFAsyncResult as ::windows::core::ComInterface>::IID
}
}