diff --git a/crates/libs/bindgen/default/Windows.Win32.winmd b/crates/libs/bindgen/default/Windows.Win32.winmd index fd015b74cc..c8343a540d 100644 Binary files a/crates/libs/bindgen/default/Windows.Win32.winmd and b/crates/libs/bindgen/default/Windows.Win32.winmd differ diff --git a/crates/libs/sys/Cargo.toml b/crates/libs/sys/Cargo.toml index ebed8e8bd7..87249e8540 100644 --- a/crates/libs/sys/Cargo.toml +++ b/crates/libs/sys/Cargo.toml @@ -35,7 +35,7 @@ adshlp = ["iads", "minwinbase", "minwindef", "oaidl", "winnt", "wtypes", "wtypes adtgen = ["winnt"] afunix = ["ws2"] amsi = [] -amvideo = ["mediaobj", "windef", "wingdi"] +amvideo = ["ksmedia", "windef", "wingdi"] appmodel = ["minwindef", "winnt"] appxpackaging = ["objidlbase", "urlmon"] asferr = [] @@ -116,6 +116,7 @@ dde = ["minwindef", "windef", "winnt"] ddeml = ["minwindef", "windef", "winnt"] ddraw = ["ksmedia", "windef"] debugapi = ["minwinbase", "winnt"] +devicetopology = [] devpkey = ["devpropdef"] devpropdef = [] dhcpsapi = ["minwindef"] @@ -131,7 +132,7 @@ dpa_dsa = ["minwindef", "objidlbase", "winnt"] dpapi = ["wincrypt", "windef", "winnt"] dsgetdc = ["lsalookup", "minwindef", "ntsecapi", "winnt", "ws2"] dshow = [] -dsound = ["mediaobj", "mmeapi", "windef", "winnt"] +dsound = ["ksmedia", "mmeapi", "windef", "winnt"] dsparse = ["winnt"] dsrole = ["minwindef"] dvdevcod = [] @@ -140,10 +141,11 @@ dwrite = ["dcommon", "dxgi", "windef"] dxcore = [] dxcore_interface = [] dxgi = ["windef", "winnt"] -dxva2api = ["d3d9", "mediaobj", "windef"] +dxva2api = ["d3d9", "ksmedia", "windef"] eaptypes = [] edevdefs = [] enclaveapi = ["minwinbase", "winnt"] +endpointvolume = [] errhandlingapi = ["winnt"] errors = [] esent = [] @@ -220,7 +222,7 @@ jobapi2 = ["minwinbase", "winnt"] joystickapi = ["mmsyscom", "windef"] kernelspecs = [] ks = ["winnt"] -ksmedia = ["basetsd", "devpropdef", "ks", "mediaobj", "mmeapi", "mmreg", "windef", "winnt"] +ksmedia = ["basetsd", "devpropdef", "ks", "mmeapi", "windef", "winnt"] ktmtypes = [] ktmw32 = ["ktmtypes", "minwinbase", "winnt"] l2cmn = [] @@ -248,10 +250,10 @@ magnification = ["minwindef", "wincodec", "windef"] mce = [] mciapi = ["minwindef", "windef", "winnt"] mcx = [] -mediaobj = [] +mediaobj = ["ksmedia"] memoryapi = ["minwinbase", "winnt"] memorybuffer = [] -mfapi = ["amvideo", "dxgi", "mediaobj", "mfobjects", "minwinbase", "minwindef", "mmeapi", "oaidl", "objidl", "objidlbase", "propidlbase", "strmif", "unknwnbase", "windef", "wingdi", "winnt", "wtypes", "wtypesbase"] +mfapi = ["amvideo", "dxgi", "ksmedia", "mediaobj", "mfobjects", "minwinbase", "minwindef", "mmeapi", "oaidl", "objidl", "objidlbase", "propidlbase", "strmif", "unknwnbase", "windef", "wingdi", "winnt", "wtypes", "wtypesbase"] mfcaptureengine = [] mfcontentdecryptionmodule = ["mfidl", "mfobjects", "objidlbase"] mfd3d12 = ["d3d12"] @@ -274,7 +276,7 @@ mmdeviceapi = ["minwindef", "oaidl", "objidl", "objidlbase", "propidlbase", "wty mmeapi = ["mmsyscom", "windef"] mmiscapi = ["minwindef", "mmsyscom", "winnt"] mmiscapi2 = ["mmsyscom"] -mmreg = ["mmeapi", "wingdi"] +mmreg = ["ksmedia", "mmeapi", "wingdi"] mmsyscom = [] mmsystem = [] mprapi = ["in6addr", "inaddr", "minwindef", "wincrypt", "winnt"] @@ -431,7 +433,7 @@ stierr = [] stireg = ["devpropdef"] stralign = ["winnt"] stringapiset = ["minwindef", "winnls", "winnt"] -strmif = ["ddraw", "dsound", "ksmedia", "mediaobj", "oaidl", "objidl", "windef", "wingdi", "winnt"] +strmif = ["ddraw", "dsound", "ksmedia", "oaidl", "objidl", "windef", "wingdi", "winnt"] strsafe = [] structuredquery = [] structuredquerycondition = ["objidl"] diff --git a/crates/libs/sys/src/Windows/amvideo/mod.rs b/crates/libs/sys/src/Windows/amvideo/mod.rs index 07bc673a5d..4c424ff36a 100644 --- a/crates/libs/sys/src/Windows/amvideo/mod.rs +++ b/crates/libs/sys/src/Windows/amvideo/mod.rs @@ -23,18 +23,18 @@ pub const AM_PROPERTY_FRAMESTEP_CANSTEP: AM_PROPERTY_FRAMESTEP = 3; pub const AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE: AM_PROPERTY_FRAMESTEP = 4; pub const AM_PROPERTY_FRAMESTEP_STEP: AM_PROPERTY_FRAMESTEP = 1; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ksmedia", feature = "windef"))] #[derive(Clone, Copy, Default)] pub struct ANALOGVIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwActiveWidth: u32, pub dwActiveHeight: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: super::ksmedia::REFERENCE_TIME, } pub const MAX_SIZE_MPEG1_SEQUENCE_INFO: u32 = 140; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy)] pub struct MPEG1VIDEOINFO { pub hdr: VIDEOINFOHEADER, @@ -42,7 +42,7 @@ pub struct MPEG1VIDEOINFO { pub cbSequenceHeader: u32, pub bSequenceHeader: [u8; 1], } -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] impl Default for MPEG1VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -63,46 +63,46 @@ impl Default for TRUECOLORINFO { } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy)] pub struct VIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: super::ksmedia::REFERENCE_TIME, pub bmiHeader: super::wingdi::BITMAPINFOHEADER, pub Anonymous: VIDEOINFO_0, } -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] impl Default for VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy)] pub union VIDEOINFO_0 { pub bmiColors: [super::wingdi::RGBQUAD; 256], pub dwBitMasks: [u32; 3], pub TrueColorInfo: TRUECOLORINFO, } -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] impl Default for VIDEOINFO_0 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy, Default)] pub struct VIDEOINFOHEADER { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: super::ksmedia::REFERENCE_TIME, pub bmiHeader: super::wingdi::BITMAPINFOHEADER, } pub const iBLUE: u32 = 2; diff --git a/crates/libs/sys/src/Windows/devicetopology/mod.rs b/crates/libs/sys/src/Windows/devicetopology/mod.rs new file mode 100644 index 0000000000..894c2ffd88 --- /dev/null +++ b/crates/libs/sys/src/Windows/devicetopology/mod.rs @@ -0,0 +1,16 @@ +pub const Connector: PartType = 0; +pub type ConnectorType = i32; +pub const DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT: u32 = 1685217608; +pub type DataFlow = i32; +pub const DeviceTopology: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1df639d0_5ec1_47aa_9379_828dc1aa8c59); +pub const EVENTCONTEXT_VOLUMESLIDER: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe2c2e9de_09b1_4b04_84e5_07931225ee04); +pub const In: DataFlow = 0; +pub const Network: ConnectorType = 5; +pub const Out: DataFlow = 1; +pub type PartType = i32; +pub const Physical_External: ConnectorType = 2; +pub const Physical_Internal: ConnectorType = 1; +pub const Software_Fixed: ConnectorType = 4; +pub const Software_IO: ConnectorType = 3; +pub const Subunit: PartType = 1; +pub const Unknown_Connector: ConnectorType = 0; diff --git a/crates/libs/sys/src/Windows/dsound/mod.rs b/crates/libs/sys/src/Windows/dsound/mod.rs index a48704568b..2ba0b6a6ff 100644 --- a/crates/libs/sys/src/Windows/dsound/mod.rs +++ b/crates/libs/sys/src/Windows/dsound/mod.rs @@ -714,5 +714,5 @@ pub type LPLPDIRECTSOUNDCAPTURE8 = *mut *mut core::ffi::c_void; pub type LPLPDIRECTSOUNDCAPTUREBUFFER = *mut *mut core::ffi::c_void; pub type LPLPDIRECTSOUNDCAPTUREBUFFER8 = *mut *mut core::ffi::c_void; pub type LPLPDIRECTSOUNDNOTIFY = *mut *mut core::ffi::c_void; -#[cfg(feature = "mediaobj")] -pub type LPREFERENCE_TIME = *mut super::mediaobj::REFERENCE_TIME; +#[cfg(feature = "ksmedia")] +pub type LPREFERENCE_TIME = *mut super::ksmedia::REFERENCE_TIME; diff --git a/crates/libs/sys/src/Windows/dxva2api/mod.rs b/crates/libs/sys/src/Windows/dxva2api/mod.rs index c2cf4b521f..193149c38b 100644 --- a/crates/libs/sys/src/Windows/dxva2api/mod.rs +++ b/crates/libs/sys/src/Windows/dxva2api/mod.rs @@ -363,10 +363,10 @@ pub const DXVA2_VideoProcBobDevice: windows_sys::core::GUID = windows_sys::core: pub const DXVA2_VideoProcProgressiveDevice: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5a54a0c9_c7ec_4bd9_8ede_f3c75dc4393b); pub const DXVA2_VideoProcSoftwareDevice: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4553d47f_ee7e_4e3f_9475_dbf1376c4810); #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ksmedia", feature = "windef"))] #[derive(Clone, Copy)] pub struct DXVA2_VideoProcessBltParams { - pub TargetFrame: super::mediaobj::REFERENCE_TIME, + pub TargetFrame: super::ksmedia::REFERENCE_TIME, pub TargetRect: super::windef::RECT, pub ConstrictionSize: super::windef::SIZE, pub StreamingFlags: u32, @@ -380,7 +380,7 @@ pub struct DXVA2_VideoProcessBltParams { pub DetailFilterChroma: DXVA2_FilterValues, pub DestData: u32, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ksmedia", feature = "windef"))] impl Default for DXVA2_VideoProcessBltParams { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -421,11 +421,11 @@ pub struct DXVA2_VideoProcessorCaps { } pub const DXVA2_VideoProcessorRenderTarget: i32 = 1; #[repr(C)] -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef"))] #[derive(Clone, Copy)] pub struct DXVA2_VideoSample { - pub Start: super::mediaobj::REFERENCE_TIME, - pub End: super::mediaobj::REFERENCE_TIME, + pub Start: super::ksmedia::REFERENCE_TIME, + pub End: super::ksmedia::REFERENCE_TIME, pub SampleFormat: DXVA2_ExtendedFormat, pub SrcSurface: *mut core::ffi::c_void, pub SrcRect: super::windef::RECT, @@ -434,7 +434,7 @@ pub struct DXVA2_VideoSample { pub PlanarAlpha: DXVA2_Fixed32, pub SampleData: u32, } -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef"))] impl Default for DXVA2_VideoSample { fn default() -> Self { unsafe { core::mem::zeroed() } diff --git a/crates/libs/sys/src/Windows/endpointvolume/mod.rs b/crates/libs/sys/src/Windows/endpointvolume/mod.rs new file mode 100644 index 0000000000..1e05919a96 --- /dev/null +++ b/crates/libs/sys/src/Windows/endpointvolume/mod.rs @@ -0,0 +1,18 @@ +#[repr(C)] +#[derive(Clone, Copy)] +pub struct AUDIO_VOLUME_NOTIFICATION_DATA { + pub guidEventContext: windows_sys::core::GUID, + pub bMuted: windows_sys::core::BOOL, + pub fMasterVolume: f32, + pub nChannels: u32, + pub afChannelVolumes: [f32; 1], +} +impl Default for AUDIO_VOLUME_NOTIFICATION_DATA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const ENDPOINT_HARDWARE_SUPPORT_METER: u32 = 4; +pub const ENDPOINT_HARDWARE_SUPPORT_MUTE: u32 = 2; +pub const ENDPOINT_HARDWARE_SUPPORT_VOLUME: u32 = 1; +pub type PAUDIO_VOLUME_NOTIFICATION_DATA = *mut AUDIO_VOLUME_NOTIFICATION_DATA; diff --git a/crates/libs/sys/src/Windows/ksmedia/mod.rs b/crates/libs/sys/src/Windows/ksmedia/mod.rs index 1f168acae4..b4565bc83b 100644 --- a/crates/libs/sys/src/Windows/ksmedia/mod.rs +++ b/crates/libs/sys/src/Windows/ksmedia/mod.rs @@ -1883,6 +1883,9 @@ pub struct KSDATAFORMAT_SUBTYPE_NABTS_FEC(pub u8); pub struct KSDATAFORMAT_SUBTYPE_OVERLAY(pub u8); #[repr(C)] #[derive(Clone, Copy, Default)] +pub struct KSDATAFORMAT_SUBTYPE_PCM(pub u8); +#[repr(C)] +#[derive(Clone, Copy, Default)] pub struct KSDATAFORMAT_SUBTYPE_RAW8(pub u8); #[repr(C)] #[derive(Clone, Copy, Default)] @@ -1928,6 +1931,9 @@ pub struct KSDATAFORMAT_SUBTYPE_VPVBI(pub u8); pub struct KSDATAFORMAT_SUBTYPE_VPVideo(pub u8); #[repr(C)] #[derive(Clone, Copy, Default)] +pub struct KSDATAFORMAT_SUBTYPE_WAVEFORMATEX(pub u8); +#[repr(C)] +#[derive(Clone, Copy, Default)] pub struct KSDATAFORMAT_SUBTYPE_WMAUDIO2(pub u8); #[repr(C)] #[derive(Clone, Copy, Default)] @@ -2003,13 +2009,13 @@ impl Default for KSDATAFORMAT_WAVEFORMATEX { } } #[repr(C, packed(1))] -#[cfg(all(feature = "ks", feature = "mmeapi", feature = "mmreg"))] +#[cfg(all(feature = "ks", feature = "mmeapi"))] #[derive(Clone, Copy)] pub struct KSDATAFORMAT_WAVEFORMATEXTENSIBLE { pub DataFormat: super::ks::KSDATAFORMAT, - pub WaveFormatExt: super::mmreg::WAVEFORMATEXTENSIBLE, + pub WaveFormatExt: WAVEFORMATEXTENSIBLE, } -#[cfg(all(feature = "ks", feature = "mmeapi", feature = "mmreg"))] +#[cfg(all(feature = "ks", feature = "mmeapi"))] impl Default for KSDATAFORMAT_WAVEFORMATEXTENSIBLE { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5034,10 +5040,9 @@ pub const KS_AMVP_MODE_SKIPODD: KS_AMVP_MODE = 4; pub const KS_AMVP_MODE_WEAVE: KS_AMVP_MODE = 0; pub type KS_AMVP_SELECTFORMATBY = i32; #[repr(C)] -#[cfg(feature = "mediaobj")] #[derive(Clone, Copy, Default)] pub struct KS_AM_ExactRateChange { - pub OutputZeroTime: super::mediaobj::REFERENCE_TIME, + pub OutputZeroTime: REFERENCE_TIME, pub Rate: i32, } pub type KS_AM_MaxFullDataRate = i32; @@ -5047,23 +5052,22 @@ pub const KS_AM_RATE_MaxFullDataRate: KS_AM_PROPERTY_TS_RATE_CHANGE = 3; pub const KS_AM_RATE_SimpleRateChange: KS_AM_PROPERTY_TS_RATE_CHANGE = 1; pub const KS_AM_RATE_Step: KS_AM_PROPERTY_TS_RATE_CHANGE = 4; #[repr(C)] -#[cfg(feature = "mediaobj")] #[derive(Clone, Copy, Default)] pub struct KS_AM_SimpleRateChange { - pub StartTime: super::mediaobj::REFERENCE_TIME, + pub StartTime: REFERENCE_TIME, pub Rate: i32, } pub type KS_AM_Step = u32; pub const KS_AM_UseNewCSSKey: u32 = 1; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy, Default)] pub struct KS_ANALOGVIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwActiveWidth: u32, pub dwActiveHeight: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, } pub type KS_AnalogVideoStandard = i32; pub const KS_AnalogVideo_NTSC_433: KS_AnalogVideoStandard = 4; @@ -5181,13 +5185,13 @@ impl Default for KS_DATAFORMAT_IMAGEINFO { } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_MPEGVIDEOINFO2 { pub DataFormat: super::ks::KSDATAFORMAT, pub MpegVideoInfoHeader2: KS_MPEGVIDEOINFO2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_MPEGVIDEOINFO2 { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5207,52 +5211,52 @@ impl Default for KS_DATAFORMAT_VBIINFOHEADER { } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_VIDEOINFOHEADER { pub DataFormat: super::ks::KSDATAFORMAT, pub VideoInfoHeader: KS_VIDEOINFOHEADER, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_VIDEOINFOHEADER { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_VIDEOINFOHEADER2 { pub DataFormat: super::ks::KSDATAFORMAT, pub VideoInfoHeader2: KS_VIDEOINFOHEADER2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_VIDEOINFOHEADER2 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_VIDEOINFO_PALETTE { pub DataFormat: super::ks::KSDATAFORMAT, pub VideoInfo: KS_VIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_VIDEOINFO_PALETTE { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_ANALOGVIDEO { pub DataRange: super::ks::KSDATARANGE, pub AnalogVideoInfo: KS_ANALOGVIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_ANALOGVIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5291,7 +5295,7 @@ impl Default for KS_DATARANGE_IMAGE { } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_MPEG1_VIDEO { pub DataRange: super::ks::KSDATARANGE, @@ -5302,14 +5306,14 @@ pub struct KS_DATARANGE_MPEG1_VIDEO { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_MPEG1VIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_MPEG1_VIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_MPEG2_VIDEO { pub DataRange: super::ks::KSDATARANGE, @@ -5320,14 +5324,14 @@ pub struct KS_DATARANGE_MPEG2_VIDEO { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_MPEGVIDEOINFO2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_MPEG2_VIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_VIDEO { pub DataRange: super::ks::KSDATARANGE, @@ -5338,14 +5342,14 @@ pub struct KS_DATARANGE_VIDEO { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_VIDEOINFOHEADER, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_VIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_VIDEO2 { pub DataRange: super::ks::KSDATARANGE, @@ -5356,14 +5360,14 @@ pub struct KS_DATARANGE_VIDEO2 { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_VIDEOINFOHEADER2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_VIDEO2 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_VIDEO_PALETTE { pub DataRange: super::ks::KSDATARANGE, @@ -5374,7 +5378,7 @@ pub struct KS_DATARANGE_VIDEO_PALETTE { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfo: KS_VIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_VIDEO_PALETTE { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5608,7 +5612,7 @@ pub const KS_MACROVISION_LEVEL2: KS_COPY_MACROVISION_LEVEL = 2; pub const KS_MACROVISION_LEVEL3: KS_COPY_MACROVISION_LEVEL = 3; pub const KS_MAX_SIZE_MPEG1_SEQUENCE_INFO: u32 = 140; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_MPEG1VIDEOINFO { pub hdr: KS_VIDEOINFOHEADER, @@ -5616,7 +5620,7 @@ pub struct KS_MPEG1VIDEOINFO { pub cbSequenceHeader: u32, pub bSequenceHeader: [u8; 1], } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_MPEG1VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5653,7 +5657,7 @@ pub struct KS_MPEGAUDIOINFO { } pub const KS_MPEGAUDIOINFO_27MhzTimebase: u32 = 1; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_MPEGVIDEOINFO2 { pub hdr: KS_VIDEOINFOHEADER2, @@ -5664,7 +5668,7 @@ pub struct KS_MPEGVIDEOINFO2 { pub dwFlags: u32, pub bSequenceHeader: [u32; 1], } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_MPEGVIDEOINFO2 { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5815,57 +5819,57 @@ pub const KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT: KS_VIDEODECODER_FLAGS = 1; pub const KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED: KS_VIDEODECODER_FLAGS = 4; pub const KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING: KS_VIDEODECODER_FLAGS = 2; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_VIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, pub bmiHeader: KS_BITMAPINFOHEADER, pub Anonymous: KS_VIDEOINFO_0, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub union KS_VIDEOINFO_0 { pub bmiColors: [KS_RGBQUAD; 256], pub dwBitMasks: [u32; 3], pub TrueColorInfo: KS_TRUECOLORINFO, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFO_0 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy, Default)] pub struct KS_VIDEOINFOHEADER { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, pub bmiHeader: KS_BITMAPINFOHEADER, } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_VIDEOINFOHEADER2 { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, pub dwInterlaceFlags: u32, pub dwCopyProtectFlags: u32, pub dwPictAspectRatioX: u32, @@ -5874,20 +5878,20 @@ pub struct KS_VIDEOINFOHEADER2 { pub dwReserved2: u32, pub bmiHeader: KS_BITMAPINFOHEADER, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFOHEADER2 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub union KS_VIDEOINFOHEADER2_0 { pub dwControlFlags: u32, pub dwReserved1: u32, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFOHEADER2_0 { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -6182,7 +6186,7 @@ pub type PKSCAMERA_PROFILE_PININFO = *mut KSCAMERA_PROFILE_PININFO; pub type PKSDATAFORMAT_DSOUND = *mut KSDATAFORMAT_DSOUND; #[cfg(all(feature = "ks", feature = "mmeapi"))] pub type PKSDATAFORMAT_WAVEFORMATEX = *mut KSDATAFORMAT_WAVEFORMATEX; -#[cfg(all(feature = "ks", feature = "mmeapi", feature = "mmreg"))] +#[cfg(all(feature = "ks", feature = "mmeapi"))] pub type PKSDATAFORMAT_WAVEFORMATEXTENSIBLE = *mut KSDATAFORMAT_WAVEFORMATEXTENSIBLE; #[cfg(feature = "ks")] pub type PKSDATARANGE_AUDIO = *mut KSDATARANGE_AUDIO; @@ -6426,11 +6430,9 @@ pub type PKS_AMVPDATAINFO = *mut KS_AMVPDATAINFO; #[cfg(feature = "windef")] pub type PKS_AMVPDIMINFO = *mut KS_AMVPDIMINFO; pub type PKS_AMVPSIZE = *mut KS_AMVPSIZE; -#[cfg(feature = "mediaobj")] pub type PKS_AM_ExactRateChange = *mut KS_AM_ExactRateChange; -#[cfg(feature = "mediaobj")] pub type PKS_AM_SimpleRateChange = *mut KS_AM_SimpleRateChange; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_ANALOGVIDEOINFO = *mut KS_ANALOGVIDEOINFO; pub type PKS_BITMAPINFOHEADER = *mut KS_BITMAPINFOHEADER; pub type PKS_COLCON = *mut KS_COLCON; @@ -6440,31 +6442,31 @@ pub type PKS_COPY_MACROVISION_LEVEL = *mut KS_COPY_MACROVISION_LEVEL; pub type PKS_DATAFORMAT_H264VIDEOINFO = *mut KS_DATAFORMAT_H264VIDEOINFO; #[cfg(feature = "ks")] pub type PKS_DATAFORMAT_IMAGEINFO = *mut KS_DATAFORMAT_IMAGEINFO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_MPEGVIDEOINFO2 = *mut KS_DATAFORMAT_MPEGVIDEOINFO2; #[cfg(feature = "ks")] pub type PKS_DATAFORMAT_VBIINFOHEADER = *mut KS_DATAFORMAT_VBIINFOHEADER; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_VIDEOINFOHEADER = *mut KS_DATAFORMAT_VIDEOINFOHEADER; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_VIDEOINFOHEADER2 = *mut KS_DATAFORMAT_VIDEOINFOHEADER2; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_VIDEOINFO_PALETTE = *mut KS_DATAFORMAT_VIDEOINFO_PALETTE; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_ANALOGVIDEO = *mut KS_DATARANGE_ANALOGVIDEO; #[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_H264_VIDEO = *mut KS_DATARANGE_H264_VIDEO; #[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_IMAGE = *mut KS_DATARANGE_IMAGE; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_MPEG1_VIDEO = *mut KS_DATARANGE_MPEG1_VIDEO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_MPEG2_VIDEO = *mut KS_DATARANGE_MPEG2_VIDEO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO = *mut KS_DATARANGE_VIDEO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO2 = *mut KS_DATARANGE_VIDEO2; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO_PALETTE = *mut KS_DATARANGE_VIDEO_PALETTE; #[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO_VBI = *mut KS_DATARANGE_VIDEO_VBI; @@ -6479,21 +6481,21 @@ pub type PKS_DVD_YUV = *mut KS_DVD_YUV; #[cfg(all(feature = "windef", feature = "winnt"))] pub type PKS_FRAME_INFO = *mut KS_FRAME_INFO; pub type PKS_H264VIDEOINFO = *mut KS_H264VIDEOINFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_MPEG1VIDEOINFO = *mut KS_MPEG1VIDEOINFO; pub type PKS_MPEGAUDIOINFO = *mut KS_MPEGAUDIOINFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_MPEGVIDEOINFO2 = *mut KS_MPEGVIDEOINFO2; pub type PKS_RGBQUAD = *mut KS_RGBQUAD; pub type PKS_TRUECOLORINFO = *mut KS_TRUECOLORINFO; pub type PKS_TVTUNER_CHANGE_INFO = *mut KS_TVTUNER_CHANGE_INFO; pub type PKS_VBIINFOHEADER = *mut KS_VBIINFOHEADER; pub type PKS_VBI_FRAME_INFO = *mut KS_VBI_FRAME_INFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_VIDEOINFO = *mut KS_VIDEOINFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_VIDEOINFOHEADER = *mut KS_VIDEOINFOHEADER; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_VIDEOINFOHEADER2 = *mut KS_VIDEOINFOHEADER2; #[cfg(feature = "windef")] pub type PKS_VIDEO_STREAM_CONFIG_CAPS = *mut KS_VIDEO_STREAM_CONFIG_CAPS; @@ -6591,11 +6593,14 @@ pub type PVIDEOFORMAT_DX12 = *mut VIDEOFORMAT_DX12; pub type PVRAM_SURFACE_INFO = *mut VRAM_SURFACE_INFO; #[cfg(feature = "ks")] pub type PVRAM_SURFACE_INFO_PROPERTY_S = *mut VRAM_SURFACE_INFO_PROPERTY_S; -#[cfg(all(feature = "mmeapi", feature = "mmreg"))] +#[cfg(feature = "mmeapi")] +pub type PWAVEFORMATEXTENSIBLE = *mut WAVEFORMATEXTENSIBLE; +#[cfg(feature = "mmeapi")] pub type PWAVEFORMATEXTENSIBLE_IEC61937 = *mut WAVEFORMATEXTENSIBLE_IEC61937; pub type PWNF_KSCAMERA_STREAMSTATE_INFO = *mut WNF_KSCAMERA_STREAMSTATE_INFO; pub type PWST_BUFFER = *mut WST_BUFFER; pub type PWST_BUFFER_LINE = *mut WST_BUFFER_LINE; +pub type REFERENCE_TIME = i64; #[repr(C)] #[derive(Clone, Copy)] pub struct SECURE_BUFFER_INFO { @@ -6616,6 +6621,26 @@ pub struct SOUNDDETECTOR_PATTERNHEADER { pub Size: u32, pub PatternType: windows_sys::core::GUID, } +pub const SPEAKER_ALL: u32 = 2147483648; +pub const SPEAKER_BACK_CENTER: u32 = 256; +pub const SPEAKER_BACK_LEFT: u32 = 16; +pub const SPEAKER_BACK_RIGHT: u32 = 32; +pub const SPEAKER_FRONT_CENTER: u32 = 4; +pub const SPEAKER_FRONT_LEFT: u32 = 1; +pub const SPEAKER_FRONT_LEFT_OF_CENTER: u32 = 64; +pub const SPEAKER_FRONT_RIGHT: u32 = 2; +pub const SPEAKER_FRONT_RIGHT_OF_CENTER: u32 = 128; +pub const SPEAKER_LOW_FREQUENCY: u32 = 8; +pub const SPEAKER_RESERVED: u32 = 2147221504; +pub const SPEAKER_SIDE_LEFT: u32 = 512; +pub const SPEAKER_SIDE_RIGHT: u32 = 1024; +pub const SPEAKER_TOP_BACK_CENTER: u32 = 65536; +pub const SPEAKER_TOP_BACK_LEFT: u32 = 32768; +pub const SPEAKER_TOP_BACK_RIGHT: u32 = 131072; +pub const SPEAKER_TOP_CENTER: u32 = 2048; +pub const SPEAKER_TOP_FRONT_CENTER: u32 = 8192; +pub const SPEAKER_TOP_FRONT_LEFT: u32 = 4096; +pub const SPEAKER_TOP_FRONT_RIGHT: u32 = 16384; pub type TELEPHONY_CALLCONTROLOP = i32; pub const TELEPHONY_CALLCONTROLOP_DISABLE: TELEPHONY_CALLCONTROLOP = 0; pub const TELEPHONY_CALLCONTROLOP_ENABLE: TELEPHONY_CALLCONTROLOP = 1; @@ -6918,20 +6943,50 @@ impl Default for VRAM_SURFACE_INFO_PROPERTY_S { pub const VariableBitRateAverage: VIDEOENCODER_BITRATE_MODE = 1; pub const VariableBitRatePeak: VIDEOENCODER_BITRATE_MODE = 2; #[repr(C, packed(1))] -#[cfg(all(feature = "mmeapi", feature = "mmreg"))] +#[cfg(feature = "mmeapi")] +#[derive(Clone, Copy)] +pub struct WAVEFORMATEXTENSIBLE { + pub Format: super::mmeapi::WAVEFORMATEX, + pub Samples: WAVEFORMATEXTENSIBLE_0, + pub dwChannelMask: u32, + pub SubFormat: windows_sys::core::GUID, +} +#[cfg(feature = "mmeapi")] +impl Default for WAVEFORMATEXTENSIBLE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[cfg(feature = "mmeapi")] +#[derive(Clone, Copy)] +pub union WAVEFORMATEXTENSIBLE_0 { + pub wValidBitsPerSample: u16, + pub wSamplesPerBlock: u16, + pub wReserved: u16, +} +#[cfg(feature = "mmeapi")] +impl Default for WAVEFORMATEXTENSIBLE_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[cfg(feature = "mmeapi")] #[derive(Clone, Copy)] pub struct WAVEFORMATEXTENSIBLE_IEC61937 { - pub FormatExt: super::mmreg::WAVEFORMATEXTENSIBLE, + pub FormatExt: WAVEFORMATEXTENSIBLE, pub dwEncodedSamplesPerSec: u32, pub dwEncodedChannelCount: u32, pub dwAverageBytesPerSec: u32, } -#[cfg(all(feature = "mmeapi", feature = "mmreg"))] +#[cfg(feature = "mmeapi")] impl Default for WAVEFORMATEXTENSIBLE_IEC61937 { fn default() -> Self { unsafe { core::mem::zeroed() } } } +pub const WAVE_FORMAT_EXTENSIBLE: u32 = 65534; #[repr(C)] #[derive(Clone, Copy, Default)] pub struct WNF_KSCAMERA_STREAMSTATE_INFO { diff --git a/crates/libs/sys/src/Windows/mediaobj/mod.rs b/crates/libs/sys/src/Windows/mediaobj/mod.rs index 43d2c9b44a..2e8c19b170 100644 --- a/crates/libs/sys/src/Windows/mediaobj/mod.rs +++ b/crates/libs/sys/src/Windows/mediaobj/mod.rs @@ -28,13 +28,15 @@ impl Default for DMO_MEDIA_TYPE { } } #[repr(C)] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy)] pub struct DMO_OUTPUT_DATA_BUFFER { pub pBuffer: *mut core::ffi::c_void, pub dwStatus: u32, - pub rtTimestamp: REFERENCE_TIME, - pub rtTimelength: REFERENCE_TIME, + pub rtTimestamp: super::ksmedia::REFERENCE_TIME, + pub rtTimelength: super::ksmedia::REFERENCE_TIME, } +#[cfg(feature = "ksmedia")] impl Default for DMO_OUTPUT_DATA_BUFFER { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -55,8 +57,8 @@ pub const DMO_QUALITY_STATUS_ENABLED: _DMO_QUALITY_STATUS_FLAGS = 1; pub const DMO_SET_TYPEF_CLEAR: _DMO_SET_TYPE_FLAGS = 2; pub const DMO_SET_TYPEF_TEST_ONLY: _DMO_SET_TYPE_FLAGS = 1; pub const DMO_VOSF_NEEDS_PREVIOUS_SAMPLE: _DMO_VIDEO_OUTPUT_STREAM_FLAGS = 1; +#[cfg(feature = "ksmedia")] pub type PDMO_OUTPUT_DATA_BUFFER = *mut DMO_OUTPUT_DATA_BUFFER; -pub type REFERENCE_TIME = i64; pub type _DMO_INPLACE_PROCESS_FLAGS = i32; pub type _DMO_INPUT_DATA_BUFFER_FLAGS = i32; pub type _DMO_INPUT_STATUS_FLAGS = i32; diff --git a/crates/libs/sys/src/Windows/mfapi/mod.rs b/crates/libs/sys/src/Windows/mfapi/mod.rs index a423d5757a..26c36aae2a 100644 --- a/crates/libs/sys/src/Windows/mfapi/mod.rs +++ b/crates/libs/sys/src/Windows/mfapi/mod.rs @@ -130,11 +130,11 @@ windows_link::link!("mfplat.dll" "system" fn MFInitAttributesFromBlob(pattribute windows_link::link!("mfplat.dll" "system" fn MFInitMediaTypeFromAMMediaType(pmftype : *mut core::ffi::c_void, pamtype : *const super::strmif::AM_MEDIA_TYPE) -> windows_sys::core::HRESULT); #[cfg(all(feature = "mfobjects", feature = "windef"))] windows_link::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMFVideoFormat(pmftype : *mut core::ffi::c_void, pmfvf : *const super::mfobjects::MFVIDEOFORMAT, cbbufsize : u32) -> windows_sys::core::HRESULT); -#[cfg(all(feature = "amvideo", feature = "mediaobj", feature = "mfobjects", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "amvideo", feature = "ksmedia", feature = "mfobjects", feature = "windef", feature = "wingdi"))] windows_link::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG1VideoInfo(pmftype : *mut core::ffi::c_void, pmp1vi : *const super::amvideo::MPEG1VIDEOINFO, cbbufsize : u32, psubtype : *const windows_sys::core::GUID) -> windows_sys::core::HRESULT); #[cfg(feature = "mfobjects")] windows_link::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG2VideoInfo(pmftype : *mut core::ffi::c_void, pmp2vi : *const MPEG2VIDEOINFO, cbbufsize : u32, psubtype : *const windows_sys::core::GUID) -> windows_sys::core::HRESULT); -#[cfg(all(feature = "amvideo", feature = "mediaobj", feature = "mfobjects", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "amvideo", feature = "ksmedia", feature = "mfobjects", feature = "windef", feature = "wingdi"))] windows_link::link!("mfplat.dll" "system" fn MFInitMediaTypeFromVideoInfoHeader(pmftype : *mut core::ffi::c_void, pvih : *const super::amvideo::VIDEOINFOHEADER, cbbufsize : u32, psubtype : *const windows_sys::core::GUID) -> windows_sys::core::HRESULT); #[cfg(feature = "mfobjects")] windows_link::link!("mfplat.dll" "system" fn MFInitMediaTypeFromVideoInfoHeader2(pmftype : *mut core::ffi::c_void, pvih2 : *const VIDEOINFOHEADER2, cbbufsize : u32, psubtype : *const windows_sys::core::GUID) -> windows_sys::core::HRESULT); diff --git a/crates/libs/sys/src/Windows/mmreg/mod.rs b/crates/libs/sys/src/Windows/mmreg/mod.rs index 947f3eb220..426b0f6144 100644 --- a/crates/libs/sys/src/Windows/mmreg/mod.rs +++ b/crates/libs/sys/src/Windows/mmreg/mod.rs @@ -317,12 +317,6 @@ pub const JPEG_YCbCr: u32 = 2; #[repr(C)] #[derive(Clone, Copy, Default)] pub struct KSDATAFORMAT_SUBTYPE_IEEE_FLOAT(pub u8); -#[repr(C)] -#[derive(Clone, Copy, Default)] -pub struct KSDATAFORMAT_SUBTYPE_PCM(pub u8); -#[repr(C)] -#[derive(Clone, Copy, Default)] -pub struct KSDATAFORMAT_SUBTYPE_WAVEFORMATEX(pub u8); pub type LPADPCMCOEFSET = *mut ADPCMCOEFSET; #[cfg(feature = "mmeapi")] pub type LPADPCMEWAVEFORMAT = *mut ADPCMEWAVEFORMAT; @@ -405,9 +399,9 @@ pub type LPSONARCWAVEFORMAT = *mut SONARCWAVEFORMAT; pub type LPTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; pub type LPVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; pub type LPWAVEFILTER = *mut WAVEFILTER; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type LPWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type LPWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; #[cfg(feature = "mmeapi")] pub type LPWMAUDIO2WAVEFORMAT = *mut WMAUDIO2WAVEFORMAT; @@ -2076,9 +2070,9 @@ pub type NPSONARCWAVEFORMAT = *mut SONARCWAVEFORMAT; pub type NPTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; pub type NPVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; pub type NPWAVEFILTER = *mut WAVEFILTER; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type NPWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type NPWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; #[cfg(feature = "mmeapi")] pub type NPYAMAHA_ADPCMWAVEFORMAT = *mut YAMAHA_ADPCMWAVEFORMAT; @@ -2192,11 +2186,9 @@ pub type PSONARCWAVEFORMAT = *mut SONARCWAVEFORMAT; pub type PTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; pub type PVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; pub type PWAVEFILTER = *mut WAVEFILTER; -#[cfg(feature = "mmeapi")] -pub type PWAVEFORMATEXTENSIBLE = *mut WAVEFORMATEXTENSIBLE; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type PWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type PWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; #[cfg(feature = "mmeapi")] pub type PYAMAHA_ADPCMWAVEFORMAT = *mut YAMAHA_ADPCMWAVEFORMAT; @@ -2269,26 +2261,6 @@ pub struct SONARCWAVEFORMAT { pub wfx: super::mmeapi::WAVEFORMATEX, pub wCompType: u16, } -pub const SPEAKER_ALL: u32 = 2147483648; -pub const SPEAKER_BACK_CENTER: u32 = 256; -pub const SPEAKER_BACK_LEFT: u32 = 16; -pub const SPEAKER_BACK_RIGHT: u32 = 32; -pub const SPEAKER_FRONT_CENTER: u32 = 4; -pub const SPEAKER_FRONT_LEFT: u32 = 1; -pub const SPEAKER_FRONT_LEFT_OF_CENTER: u32 = 64; -pub const SPEAKER_FRONT_RIGHT: u32 = 2; -pub const SPEAKER_FRONT_RIGHT_OF_CENTER: u32 = 128; -pub const SPEAKER_LOW_FREQUENCY: u32 = 8; -pub const SPEAKER_RESERVED: u32 = 2147221504; -pub const SPEAKER_SIDE_LEFT: u32 = 512; -pub const SPEAKER_SIDE_RIGHT: u32 = 1024; -pub const SPEAKER_TOP_BACK_CENTER: u32 = 65536; -pub const SPEAKER_TOP_BACK_LEFT: u32 = 32768; -pub const SPEAKER_TOP_BACK_RIGHT: u32 = 131072; -pub const SPEAKER_TOP_CENTER: u32 = 2048; -pub const SPEAKER_TOP_FRONT_CENTER: u32 = 8192; -pub const SPEAKER_TOP_FRONT_LEFT: u32 = 4096; -pub const SPEAKER_TOP_FRONT_RIGHT: u32 = 16384; #[repr(C, packed(1))] #[cfg(feature = "mmeapi")] #[derive(Clone, Copy)] @@ -2323,39 +2295,10 @@ impl Default for WAVEFILTER { unsafe { core::mem::zeroed() } } } -#[repr(C, packed(1))] -#[cfg(feature = "mmeapi")] -#[derive(Clone, Copy)] -pub struct WAVEFORMATEXTENSIBLE { - pub Format: super::mmeapi::WAVEFORMATEX, - pub Samples: WAVEFORMATEXTENSIBLE_0, - pub dwChannelMask: u32, - pub SubFormat: windows_sys::core::GUID, -} -#[cfg(feature = "mmeapi")] -impl Default for WAVEFORMATEXTENSIBLE { - fn default() -> Self { - unsafe { core::mem::zeroed() } - } -} -#[repr(C, packed(1))] -#[cfg(feature = "mmeapi")] -#[derive(Clone, Copy)] -pub union WAVEFORMATEXTENSIBLE_0 { - pub wValidBitsPerSample: u16, - pub wSamplesPerBlock: u16, - pub wReserved: u16, -} -#[cfg(feature = "mmeapi")] -impl Default for WAVEFORMATEXTENSIBLE_0 { - fn default() -> Self { - unsafe { core::mem::zeroed() } - } -} -#[cfg(feature = "mmeapi")] -pub type WAVEFORMATIEEEFLOATEX = WAVEFORMATEXTENSIBLE; -#[cfg(feature = "mmeapi")] -pub type WAVEFORMATPCMEX = WAVEFORMATEXTENSIBLE; +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] +pub type WAVEFORMATIEEEFLOATEX = super::ksmedia::WAVEFORMATEXTENSIBLE; +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] +pub type WAVEFORMATPCMEX = super::ksmedia::WAVEFORMATEXTENSIBLE; pub const WAVE_FILTER_DEVELOPMENT: u32 = 65535; pub const WAVE_FILTER_ECHO: u32 = 2; pub const WAVE_FILTER_UNKNOWN: u32 = 0; @@ -2419,7 +2362,6 @@ pub const WAVE_FORMAT_ECHOSC3: u32 = 58; pub const WAVE_FORMAT_ENCORE_G726: u32 = 41223; pub const WAVE_FORMAT_ESPCM: u32 = 97; pub const WAVE_FORMAT_ESST_AC3: u32 = 577; -pub const WAVE_FORMAT_EXTENSIBLE: u32 = 65534; pub const WAVE_FORMAT_FAAD_AAC: u32 = 28781; pub const WAVE_FORMAT_FLAC: u32 = 61868; pub const WAVE_FORMAT_FM_TOWNS_SND: u32 = 768; diff --git a/crates/libs/sys/src/Windows/mod.rs b/crates/libs/sys/src/Windows/mod.rs index 13f56efe9e..4e23496715 100644 --- a/crates/libs/sys/src/Windows/mod.rs +++ b/crates/libs/sys/src/Windows/mod.rs @@ -174,6 +174,8 @@ pub mod ddeml; pub mod ddraw; #[cfg(feature = "debugapi")] pub mod debugapi; +#[cfg(feature = "devicetopology")] +pub mod devicetopology; #[cfg(feature = "devpkey")] pub mod devpkey; #[cfg(feature = "devpropdef")] @@ -230,6 +232,8 @@ pub mod eaptypes; pub mod edevdefs; #[cfg(feature = "enclaveapi")] pub mod enclaveapi; +#[cfg(feature = "endpointvolume")] +pub mod endpointvolume; #[cfg(feature = "errhandlingapi")] pub mod errhandlingapi; #[cfg(feature = "errors")] diff --git a/crates/libs/sys/src/Windows/strmif/mod.rs b/crates/libs/sys/src/Windows/strmif/mod.rs index ca62125e0a..b2575411e5 100644 --- a/crates/libs/sys/src/Windows/strmif/mod.rs +++ b/crates/libs/sys/src/Windows/strmif/mod.rs @@ -206,21 +206,21 @@ pub const AM_QUERY_DECODER_DXVA_1_SUPPORT: u32 = 2; pub const AM_QUERY_DECODER_VMR_SUPPORT: u32 = 1; pub const AM_RENDEREX_RENDERTOEXISTINGRENDERERS: _AM_RENSDEREXFLAGS = 1; #[repr(C)] -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy)] pub struct AM_SAMPLE2_PROPERTIES { pub cbData: u32, pub dwTypeSpecificFlags: u32, pub dwSampleFlags: u32, pub lActual: i32, - pub tStart: super::mediaobj::REFERENCE_TIME, - pub tStop: super::mediaobj::REFERENCE_TIME, + pub tStart: super::ksmedia::REFERENCE_TIME, + pub tStop: super::ksmedia::REFERENCE_TIME, pub dwStreamId: u32, pub pMediaType: *mut AM_MEDIA_TYPE, pub pbBuffer: *mut u8, pub cbBuffer: i32, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl Default for AM_SAMPLE2_PROPERTIES { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -257,11 +257,11 @@ pub const AM_SEEKING_Segment: AM_SEEKING_SEEKING_FLAGS = 16; pub const AM_SEEKING_Source: AM_SEEKING_SEEKING_CAPABILITIES = 256; pub const AM_STREAM_CONTROL: tagAM_SAMPLE_PROPERTY_FLAGS = 1; #[repr(C)] -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy, Default)] pub struct AM_STREAM_INFO { - pub tStart: super::mediaobj::REFERENCE_TIME, - pub tStop: super::mediaobj::REFERENCE_TIME, + pub tStart: super::ksmedia::REFERENCE_TIME, + pub tStop: super::ksmedia::REFERENCE_TIME, pub dwStartCookie: u32, pub dwStopCookie: u32, pub dwFlags: u32, @@ -932,13 +932,13 @@ pub const PhysConn_Video_VideoEncoder: PhysicalConnectorType = 13; pub const PhysConn_Video_YRYBY: PhysicalConnectorType = 5; pub type PhysicalConnectorType = i32; #[repr(C)] -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy, Default)] pub struct Quality { pub Type: QualityMessageType, pub Proportion: i32, - pub Late: super::mediaobj::REFERENCE_TIME, - pub TimeStamp: super::mediaobj::REFERENCE_TIME, + pub Late: super::ksmedia::REFERENCE_TIME, + pub TimeStamp: super::ksmedia::REFERENCE_TIME, } pub type QualityMessageType = i32; #[repr(C)] @@ -1232,20 +1232,20 @@ pub const VMRMode_Renderless: VMRMode = 4; pub const VMRMode_Windowed: VMRMode = 1; pub const VMRMode_Windowless: VMRMode = 2; #[repr(C)] -#[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] #[derive(Clone, Copy)] pub struct VMRPRESENTATIONINFO { pub dwFlags: u32, pub lpSurf: *mut core::ffi::c_void, - pub rtStart: super::mediaobj::REFERENCE_TIME, - pub rtEnd: super::mediaobj::REFERENCE_TIME, + pub rtStart: super::ksmedia::REFERENCE_TIME, + pub rtEnd: super::ksmedia::REFERENCE_TIME, pub szAspectRatio: super::windef::SIZE, pub rcSrc: super::windef::RECT, pub rcDst: super::windef::RECT, pub dwTypeSpecificFlags: u32, pub dwInterlaceFlags: u32, } -#[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] impl Default for VMRPRESENTATIONINFO { fn default() -> Self { unsafe { core::mem::zeroed() } diff --git a/crates/libs/windows/Cargo.toml b/crates/libs/windows/Cargo.toml index a618e460cf..41e0f8bde0 100644 --- a/crates/libs/windows/Cargo.toml +++ b/crates/libs/windows/Cargo.toml @@ -362,7 +362,7 @@ adshlp = ["iads", "minwinbase", "minwindef", "oaidl", "winnt", "wtypes", "wtypes adtgen = ["winnt"] afunix = ["ws2"] amsi = [] -amvideo = ["mediaobj", "windef", "wingdi"] +amvideo = ["ksmedia", "windef", "wingdi"] appmodel = ["minwindef", "winnt"] appxpackaging = ["objidlbase", "urlmon"] asferr = [] @@ -443,6 +443,7 @@ dde = ["minwindef", "windef", "winnt"] ddeml = ["minwindef", "windef", "winnt"] ddraw = ["ksmedia", "windef"] debugapi = ["minwinbase", "winnt"] +devicetopology = [] devpkey = ["devpropdef"] devpropdef = [] dhcpsapi = ["minwindef"] @@ -458,7 +459,7 @@ dpa_dsa = ["minwindef", "objidlbase", "winnt"] dpapi = ["wincrypt", "windef", "winnt"] dsgetdc = ["lsalookup", "minwindef", "ntsecapi", "winnt", "ws2"] dshow = [] -dsound = ["mediaobj", "mmeapi", "windef", "winnt"] +dsound = ["ksmedia", "mmeapi", "windef", "winnt"] dsparse = ["winnt"] dsrole = ["minwindef"] dvdevcod = [] @@ -467,10 +468,11 @@ dwrite = ["dcommon", "dxgi", "windef"] dxcore = [] dxcore_interface = [] dxgi = ["windef", "winnt"] -dxva2api = ["d3d9", "mediaobj", "windef"] +dxva2api = ["d3d9", "ksmedia", "windef"] eaptypes = [] edevdefs = [] enclaveapi = ["minwinbase", "winnt"] +endpointvolume = [] errhandlingapi = ["winnt"] errors = [] esent = [] @@ -547,7 +549,7 @@ jobapi2 = ["minwinbase", "winnt"] joystickapi = ["mmsyscom", "windef"] kernelspecs = [] ks = ["winnt"] -ksmedia = ["basetsd", "devpropdef", "ks", "mediaobj", "mmeapi", "mmreg", "windef", "winnt"] +ksmedia = ["basetsd", "devpropdef", "ks", "mmeapi", "windef", "winnt"] ktmtypes = [] ktmw32 = ["ktmtypes", "minwinbase", "winnt"] l2cmn = [] @@ -575,10 +577,10 @@ magnification = ["minwindef", "wincodec", "windef"] mce = [] mciapi = ["minwindef", "windef", "winnt"] mcx = [] -mediaobj = [] +mediaobj = ["ksmedia"] memoryapi = ["minwinbase", "winnt"] memorybuffer = [] -mfapi = ["amvideo", "dxgi", "mediaobj", "mfobjects", "minwinbase", "minwindef", "mmeapi", "oaidl", "objidl", "objidlbase", "propidlbase", "strmif", "unknwnbase", "windef", "wingdi", "winnt", "wtypes", "wtypesbase"] +mfapi = ["amvideo", "dxgi", "ksmedia", "mediaobj", "mfobjects", "minwinbase", "minwindef", "mmeapi", "oaidl", "objidl", "objidlbase", "propidlbase", "strmif", "unknwnbase", "windef", "wingdi", "winnt", "wtypes", "wtypesbase"] mfcaptureengine = [] mfcontentdecryptionmodule = ["mfidl", "mfobjects", "objidlbase"] mfd3d12 = ["d3d12"] @@ -601,7 +603,7 @@ mmdeviceapi = ["minwindef", "oaidl", "objidl", "objidlbase", "propidlbase", "wty mmeapi = ["mmsyscom", "windef"] mmiscapi = ["minwindef", "mmsyscom", "winnt"] mmiscapi2 = ["mmsyscom"] -mmreg = ["mmeapi", "wingdi"] +mmreg = ["ksmedia", "mmeapi", "wingdi"] mmsyscom = [] mmsystem = [] mprapi = ["in6addr", "inaddr", "minwindef", "wincrypt", "winnt"] @@ -758,7 +760,7 @@ stierr = [] stireg = ["devpropdef"] stralign = ["winnt"] stringapiset = ["minwindef", "winnls", "winnt"] -strmif = ["ddraw", "dsound", "ksmedia", "mediaobj", "oaidl", "objidl", "windef", "wingdi", "winnt"] +strmif = ["ddraw", "dsound", "ksmedia", "oaidl", "objidl", "windef", "wingdi", "winnt"] strsafe = [] structuredquery = [] structuredquerycondition = ["objidl"] diff --git a/crates/libs/windows/src/Windows/amvideo/mod.rs b/crates/libs/windows/src/Windows/amvideo/mod.rs index 0632a850cf..1c0afff3f3 100644 --- a/crates/libs/windows/src/Windows/amvideo/mod.rs +++ b/crates/libs/windows/src/Windows/amvideo/mod.rs @@ -23,14 +23,14 @@ pub const AM_PROPERTY_FRAMESTEP_CANSTEP: AM_PROPERTY_FRAMESTEP = 3; pub const AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE: AM_PROPERTY_FRAMESTEP = 4; pub const AM_PROPERTY_FRAMESTEP_STEP: AM_PROPERTY_FRAMESTEP = 1; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ksmedia", feature = "windef"))] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct ANALOGVIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwActiveWidth: u32, pub dwActiveHeight: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: super::ksmedia::REFERENCE_TIME, } windows_core::imp::define_interface!(IBaseVideoMixer, IBaseVideoMixer_Vtbl, 0); windows_core::imp::interface_hierarchy!(IBaseVideoMixer, windows_core::IUnknown); @@ -1005,7 +1005,7 @@ impl IQualProp_Vtbl { impl windows_core::RuntimeName for IQualProp {} pub const MAX_SIZE_MPEG1_SEQUENCE_INFO: u32 = 140; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct MPEG1VIDEOINFO { pub hdr: VIDEOINFOHEADER, @@ -1013,7 +1013,7 @@ pub struct MPEG1VIDEOINFO { pub cbSequenceHeader: u32, pub bSequenceHeader: [u8; 1], } -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] impl Default for MPEG1VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -1034,46 +1034,46 @@ impl Default for TRUECOLORINFO { } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy)] pub struct VIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: super::ksmedia::REFERENCE_TIME, pub bmiHeader: super::wingdi::BITMAPINFOHEADER, pub Anonymous: VIDEOINFO_0, } -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] impl Default for VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy)] pub union VIDEOINFO_0 { pub bmiColors: [super::wingdi::RGBQUAD; 256], pub dwBitMasks: [u32; 3], pub TrueColorInfo: TRUECOLORINFO, } -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] impl Default for VIDEOINFO_0 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "ksmedia", feature = "windef", feature = "wingdi"))] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct VIDEOINFOHEADER { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: super::ksmedia::REFERENCE_TIME, pub bmiHeader: super::wingdi::BITMAPINFOHEADER, } pub const iBLUE: u32 = 2; diff --git a/crates/libs/windows/src/Windows/audioclient/mod.rs b/crates/libs/windows/src/Windows/audioclient/mod.rs index 6179490b7d..5e2b7a74d3 100644 --- a/crates/libs/windows/src/Windows/audioclient/mod.rs +++ b/crates/libs/windows/src/Windows/audioclient/mod.rs @@ -288,8 +288,8 @@ impl windows_core::RuntimeName for IAudioCaptureClient {} windows_core::imp::define_interface!(IAudioClient, IAudioClient_Vtbl, 0x1cb9ad4c_dbfa_4c32_b178_c2f568a703b2); windows_core::imp::interface_hierarchy!(IAudioClient, windows_core::IUnknown); impl IAudioClient { - #[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi"))] - pub unsafe fn Initialize(&self, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: super::mediaobj::REFERENCE_TIME, hnsperiodicity: super::mediaobj::REFERENCE_TIME, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + #[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi"))] + pub unsafe fn Initialize(&self, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: super::ksmedia::REFERENCE_TIME, hnsperiodicity: super::ksmedia::REFERENCE_TIME, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: Option<*const windows_core::GUID>) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), sharemode, streamflags, hnsbufferduration, hnsperiodicity, pformat, audiosessionguid.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetBufferSize(&self) -> windows_core::Result { @@ -298,8 +298,8 @@ impl IAudioClient { (windows_core::Interface::vtable(self).GetBufferSize)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetStreamLatency(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetStreamLatency(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamLatency)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) @@ -322,8 +322,8 @@ impl IAudioClient { (windows_core::Interface::vtable(self).GetMixFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetDevicePeriod(&self, phnsdefaultdeviceperiod: Option<*mut super::mediaobj::REFERENCE_TIME>, phnsminimumdeviceperiod: Option<*mut super::mediaobj::REFERENCE_TIME>) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetDevicePeriod(&self, phnsdefaultdeviceperiod: Option<*mut super::ksmedia::REFERENCE_TIME>, phnsminimumdeviceperiod: Option<*mut super::ksmedia::REFERENCE_TIME>) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).GetDevicePeriod)(windows_core::Interface::as_raw(self), phnsdefaultdeviceperiod.unwrap_or(core::mem::zeroed()) as _, phnsminimumdeviceperiod.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Start(&self) -> windows_core::HRESULT { @@ -351,14 +351,14 @@ impl IAudioClient { #[doc(hidden)] pub struct IAudioClient_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi"))] - pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, super::audiosessiontypes::AUDCLNT_SHAREMODE, u32, super::mediaobj::REFERENCE_TIME, super::mediaobj::REFERENCE_TIME, *const super::mmeapi::WAVEFORMATEX, *const windows_core::GUID) -> windows_core::HRESULT, - #[cfg(not(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi")))] + #[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi"))] + pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, super::audiosessiontypes::AUDCLNT_SHAREMODE, u32, super::ksmedia::REFERENCE_TIME, super::ksmedia::REFERENCE_TIME, *const super::mmeapi::WAVEFORMATEX, *const windows_core::GUID) -> windows_core::HRESULT, + #[cfg(not(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi")))] Initialize: usize, pub GetBufferSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub GetStreamLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetStreamLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetStreamLatency: usize, pub GetCurrentPadding: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, #[cfg(all(feature = "audiosessiontypes", feature = "mmeapi"))] @@ -369,9 +369,9 @@ pub struct IAudioClient_Vtbl { pub GetMixFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut super::mmeapi::WAVEFORMATEX) -> windows_core::HRESULT, #[cfg(not(feature = "mmeapi"))] GetMixFormat: usize, - #[cfg(feature = "mediaobj")] - pub GetDevicePeriod: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetDevicePeriod: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetDevicePeriod: usize, pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, @@ -382,25 +382,25 @@ pub struct IAudioClient_Vtbl { SetEventHandle: usize, pub GetService: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] pub trait IAudioClient_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: super::mediaobj::REFERENCE_TIME, hnsperiodicity: super::mediaobj::REFERENCE_TIME, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: *const windows_core::GUID) -> windows_core::Result<()>; + fn Initialize(&self, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: super::ksmedia::REFERENCE_TIME, hnsperiodicity: super::ksmedia::REFERENCE_TIME, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: *const windows_core::GUID) -> windows_core::Result<()>; fn GetBufferSize(&self) -> windows_core::Result; - fn GetStreamLatency(&self) -> windows_core::Result; + fn GetStreamLatency(&self) -> windows_core::Result; fn GetCurrentPadding(&self) -> windows_core::Result; fn IsFormatSupported(&self, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, pformat: *const super::mmeapi::WAVEFORMATEX, ppclosestmatch: *mut *mut super::mmeapi::WAVEFORMATEX) -> windows_core::Result<()>; fn GetMixFormat(&self) -> windows_core::Result<*mut super::mmeapi::WAVEFORMATEX>; - fn GetDevicePeriod(&self, phnsdefaultdeviceperiod: *mut super::mediaobj::REFERENCE_TIME, phnsminimumdeviceperiod: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn GetDevicePeriod(&self, phnsdefaultdeviceperiod: *mut super::ksmedia::REFERENCE_TIME, phnsminimumdeviceperiod: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn Start(&self) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn SetEventHandle(&self, eventhandle: super::winnt::HANDLE) -> windows_core::Result<()>; fn GetService(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] impl IAudioClient_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: super::mediaobj::REFERENCE_TIME, hnsperiodicity: super::mediaobj::REFERENCE_TIME, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, sharemode: super::audiosessiontypes::AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: super::ksmedia::REFERENCE_TIME, hnsperiodicity: super::ksmedia::REFERENCE_TIME, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: *const windows_core::GUID) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAudioClient_Impl::Initialize(this, core::mem::transmute_copy(&sharemode), core::mem::transmute_copy(&streamflags), core::mem::transmute_copy(&hnsbufferduration), core::mem::transmute_copy(&hnsperiodicity), core::mem::transmute_copy(&pformat), core::mem::transmute_copy(&audiosessionguid)).into() @@ -418,7 +418,7 @@ impl IAudioClient_Vtbl { } } } - unsafe extern "system" fn GetStreamLatency(this: *mut core::ffi::c_void, phnslatency: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetStreamLatency(this: *mut core::ffi::c_void, phnslatency: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IAudioClient_Impl::GetStreamLatency(this) { @@ -460,7 +460,7 @@ impl IAudioClient_Vtbl { } } } - unsafe extern "system" fn GetDevicePeriod(this: *mut core::ffi::c_void, phnsdefaultdeviceperiod: *mut super::mediaobj::REFERENCE_TIME, phnsminimumdeviceperiod: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetDevicePeriod(this: *mut core::ffi::c_void, phnsdefaultdeviceperiod: *mut super::ksmedia::REFERENCE_TIME, phnsminimumdeviceperiod: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAudioClient_Impl::GetDevicePeriod(this, core::mem::transmute_copy(&phnsdefaultdeviceperiod), core::mem::transmute_copy(&phnsminimumdeviceperiod)).into() @@ -516,7 +516,7 @@ impl IAudioClient_Vtbl { iid == &::IID } } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] impl windows_core::RuntimeName for IAudioClient {} windows_core::imp::define_interface!(IAudioClient2, IAudioClient2_Vtbl, 0x726778cd_f60a_4eda_82de_e47610cd78aa); impl core::ops::Deref for IAudioClient2 { @@ -538,8 +538,8 @@ impl IAudioClient2 { pub unsafe fn SetClientProperties(&self, pproperties: *const AudioClientProperties) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetClientProperties)(windows_core::Interface::as_raw(self), pproperties) } } - #[cfg(all(feature = "mediaobj", feature = "mmeapi"))] - pub unsafe fn GetBufferSizeLimits(&self, pformat: *const super::mmeapi::WAVEFORMATEX, beventdriven: bool, phnsminbufferduration: *mut super::mediaobj::REFERENCE_TIME, phnsmaxbufferduration: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(all(feature = "ksmedia", feature = "mmeapi"))] + pub unsafe fn GetBufferSizeLimits(&self, pformat: *const super::mmeapi::WAVEFORMATEX, beventdriven: bool, phnsminbufferduration: *mut super::ksmedia::REFERENCE_TIME, phnsmaxbufferduration: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).GetBufferSizeLimits)(windows_core::Interface::as_raw(self), pformat, beventdriven.into(), phnsminbufferduration as _, phnsmaxbufferduration as _) } } } @@ -555,18 +555,18 @@ pub struct IAudioClient2_Vtbl { pub SetClientProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *const AudioClientProperties) -> windows_core::HRESULT, #[cfg(not(feature = "audiosessiontypes"))] SetClientProperties: usize, - #[cfg(all(feature = "mediaobj", feature = "mmeapi"))] - pub GetBufferSizeLimits: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::mmeapi::WAVEFORMATEX, windows_core::BOOL, *mut super::mediaobj::REFERENCE_TIME, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(all(feature = "mediaobj", feature = "mmeapi")))] + #[cfg(all(feature = "ksmedia", feature = "mmeapi"))] + pub GetBufferSizeLimits: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::mmeapi::WAVEFORMATEX, windows_core::BOOL, *mut super::ksmedia::REFERENCE_TIME, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ksmedia", feature = "mmeapi")))] GetBufferSizeLimits: usize, } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] pub trait IAudioClient2_Impl: IAudioClient_Impl { fn IsOffloadCapable(&self, category: super::audiosessiontypes::AUDIO_STREAM_CATEGORY) -> windows_core::Result; fn SetClientProperties(&self, pproperties: *const AudioClientProperties) -> windows_core::Result<()>; - fn GetBufferSizeLimits(&self, pformat: *const super::mmeapi::WAVEFORMATEX, beventdriven: windows_core::BOOL, phnsminbufferduration: *mut super::mediaobj::REFERENCE_TIME, phnsmaxbufferduration: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn GetBufferSizeLimits(&self, pformat: *const super::mmeapi::WAVEFORMATEX, beventdriven: windows_core::BOOL, phnsminbufferduration: *mut super::ksmedia::REFERENCE_TIME, phnsmaxbufferduration: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] impl IAudioClient2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsOffloadCapable(this: *mut core::ffi::c_void, category: super::audiosessiontypes::AUDIO_STREAM_CATEGORY, pboffloadcapable: *mut windows_core::BOOL) -> windows_core::HRESULT { @@ -587,7 +587,7 @@ impl IAudioClient2_Vtbl { IAudioClient2_Impl::SetClientProperties(this, core::mem::transmute_copy(&pproperties)).into() } } - unsafe extern "system" fn GetBufferSizeLimits(this: *mut core::ffi::c_void, pformat: *const super::mmeapi::WAVEFORMATEX, beventdriven: windows_core::BOOL, phnsminbufferduration: *mut super::mediaobj::REFERENCE_TIME, phnsmaxbufferduration: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetBufferSizeLimits(this: *mut core::ffi::c_void, pformat: *const super::mmeapi::WAVEFORMATEX, beventdriven: windows_core::BOOL, phnsminbufferduration: *mut super::ksmedia::REFERENCE_TIME, phnsmaxbufferduration: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAudioClient2_Impl::GetBufferSizeLimits(this, core::mem::transmute_copy(&pformat), core::mem::transmute_copy(&beventdriven), core::mem::transmute_copy(&phnsminbufferduration), core::mem::transmute_copy(&phnsmaxbufferduration)).into() @@ -604,7 +604,7 @@ impl IAudioClient2_Vtbl { iid == &::IID || iid == &::IID } } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] impl windows_core::RuntimeName for IAudioClient2 {} windows_core::imp::define_interface!(IAudioClient3, IAudioClient3_Vtbl, 0x7ed4ee07_8e67_4cd4_8c1a_2b7a5987ad42); impl core::ops::Deref for IAudioClient3 { @@ -645,13 +645,13 @@ pub struct IAudioClient3_Vtbl { #[cfg(not(feature = "mmeapi"))] InitializeSharedAudioStream: usize, } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] pub trait IAudioClient3_Impl: IAudioClient2_Impl { fn GetSharedModeEnginePeriod(&self, pformat: *const super::mmeapi::WAVEFORMATEX, pdefaultperiodinframes: *mut u32, pfundamentalperiodinframes: *mut u32, pminperiodinframes: *mut u32, pmaxperiodinframes: *mut u32) -> windows_core::Result<()>; fn GetCurrentSharedModeEnginePeriod(&self, ppformat: *mut *mut super::mmeapi::WAVEFORMATEX, pcurrentperiodinframes: *mut u32) -> windows_core::Result<()>; fn InitializeSharedAudioStream(&self, streamflags: u32, periodinframes: u32, pformat: *const super::mmeapi::WAVEFORMATEX, audiosessionguid: *const windows_core::GUID) -> windows_core::Result<()>; } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] impl IAudioClient3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetSharedModeEnginePeriod(this: *mut core::ffi::c_void, pformat: *const super::mmeapi::WAVEFORMATEX, pdefaultperiodinframes: *mut u32, pfundamentalperiodinframes: *mut u32, pminperiodinframes: *mut u32, pmaxperiodinframes: *mut u32) -> windows_core::HRESULT { @@ -683,7 +683,7 @@ impl IAudioClient3_Vtbl { iid == &::IID || iid == &::IID || iid == &::IID } } -#[cfg(all(feature = "audiosessiontypes", feature = "mediaobj", feature = "mmeapi", feature = "winnt"))] +#[cfg(all(feature = "audiosessiontypes", feature = "ksmedia", feature = "mmeapi", feature = "winnt"))] impl windows_core::RuntimeName for IAudioClient3 {} windows_core::imp::define_interface!(IAudioClientDuckingControl, IAudioClientDuckingControl_Vtbl, 0xc789d381_a28c_4168_b28f_d3a837924dc3); windows_core::imp::interface_hierarchy!(IAudioClientDuckingControl, windows_core::IUnknown); diff --git a/crates/libs/windows/src/Windows/devicetopology/mod.rs b/crates/libs/windows/src/Windows/devicetopology/mod.rs new file mode 100644 index 0000000000..eeeca80186 --- /dev/null +++ b/crates/libs/windows/src/Windows/devicetopology/mod.rs @@ -0,0 +1,1916 @@ +pub const Connector: PartType = 0; +pub type ConnectorType = i32; +pub const DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT: u32 = 1685217608; +pub type DataFlow = i32; +pub const DeviceTopology: windows_core::GUID = windows_core::GUID::from_u128(0x1df639d0_5ec1_47aa_9379_828dc1aa8c59); +pub const EVENTCONTEXT_VOLUMESLIDER: windows_core::GUID = windows_core::GUID::from_u128(0xe2c2e9de_09b1_4b04_84e5_07931225ee04); +windows_core::imp::define_interface!(IAudioAutoGainControl, IAudioAutoGainControl_Vtbl, 0x85401fd4_6de4_4b9d_9869_2d6753a82f3c); +windows_core::imp::interface_hierarchy!(IAudioAutoGainControl, windows_core::IUnknown); +impl IAudioAutoGainControl { + pub unsafe fn GetEnabled(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn SetEnabled(&self, benable: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioAutoGainControl_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT, + pub SetEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, *const windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IAudioAutoGainControl_Impl: windows_core::IUnknownImpl { + fn GetEnabled(&self) -> windows_core::Result; + fn SetEnabled(&self, benable: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; +} +impl IAudioAutoGainControl_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetEnabled(this: *mut core::ffi::c_void, pbenabled: *mut windows_core::BOOL) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioAutoGainControl_Impl::GetEnabled(this) { + Ok(ok__) => { + pbenabled.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetEnabled(this: *mut core::ffi::c_void, benable: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioAutoGainControl_Impl::SetEnabled(this, core::mem::transmute_copy(&benable), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetEnabled: GetEnabled::, + SetEnabled: SetEnabled::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioAutoGainControl {} +windows_core::imp::define_interface!(IAudioBass, IAudioBass_Vtbl, 0xa2b1a1d9_4db3_425d_a2b2_bd335cb3e2e5); +impl core::ops::Deref for IAudioBass { + type Target = IPerChannelDbLevel; + fn deref(&self) -> &Self::Target { + unsafe { core::mem::transmute(self) } + } +} +windows_core::imp::interface_hierarchy!(IAudioBass, windows_core::IUnknown, IPerChannelDbLevel); +#[repr(C)] +#[doc(hidden)] +pub struct IAudioBass_Vtbl { + pub base__: IPerChannelDbLevel_Vtbl, +} +pub trait IAudioBass_Impl: IPerChannelDbLevel_Impl {} +impl IAudioBass_Vtbl { + pub const fn new() -> Self { + Self { base__: IPerChannelDbLevel_Vtbl::new::() } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID || iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioBass {} +windows_core::imp::define_interface!(IAudioChannelConfig, IAudioChannelConfig_Vtbl, 0xbb11c46f_ec28_493c_b88a_5db88062ce98); +windows_core::imp::interface_hierarchy!(IAudioChannelConfig, windows_core::IUnknown); +impl IAudioChannelConfig { + pub unsafe fn SetChannelConfig(&self, dwconfig: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetChannelConfig)(windows_core::Interface::as_raw(self), dwconfig, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } + pub unsafe fn GetChannelConfig(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelConfig)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioChannelConfig_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub SetChannelConfig: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, + pub GetChannelConfig: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, +} +pub trait IAudioChannelConfig_Impl: windows_core::IUnknownImpl { + fn SetChannelConfig(&self, dwconfig: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn GetChannelConfig(&self) -> windows_core::Result; +} +impl IAudioChannelConfig_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn SetChannelConfig(this: *mut core::ffi::c_void, dwconfig: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioChannelConfig_Impl::SetChannelConfig(this, core::mem::transmute_copy(&dwconfig), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn GetChannelConfig(this: *mut core::ffi::c_void, pdwconfig: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioChannelConfig_Impl::GetChannelConfig(this) { + Ok(ok__) => { + pdwconfig.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + SetChannelConfig: SetChannelConfig::, + GetChannelConfig: GetChannelConfig::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioChannelConfig {} +windows_core::imp::define_interface!(IAudioInputSelector, IAudioInputSelector_Vtbl, 0x4f03dc02_5e6e_4653_8f72_a030c123d598); +windows_core::imp::interface_hierarchy!(IAudioInputSelector, windows_core::IUnknown); +impl IAudioInputSelector { + pub unsafe fn GetSelection(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn SetSelection(&self, nidselect: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioInputSelector_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetSelection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub SetSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IAudioInputSelector_Impl: windows_core::IUnknownImpl { + fn GetSelection(&self) -> windows_core::Result; + fn SetSelection(&self, nidselect: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; +} +impl IAudioInputSelector_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetSelection(this: *mut core::ffi::c_void, pnidselected: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioInputSelector_Impl::GetSelection(this) { + Ok(ok__) => { + pnidselected.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetSelection(this: *mut core::ffi::c_void, nidselect: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioInputSelector_Impl::SetSelection(this, core::mem::transmute_copy(&nidselect), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetSelection: GetSelection::, + SetSelection: SetSelection::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioInputSelector {} +windows_core::imp::define_interface!(IAudioLoudness, IAudioLoudness_Vtbl, 0x7d8b1437_dd53_4350_9c1b_1ee2890bd938); +windows_core::imp::interface_hierarchy!(IAudioLoudness, windows_core::IUnknown); +impl IAudioLoudness { + pub unsafe fn GetEnabled(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn SetEnabled(&self, benable: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioLoudness_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT, + pub SetEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, *const windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IAudioLoudness_Impl: windows_core::IUnknownImpl { + fn GetEnabled(&self) -> windows_core::Result; + fn SetEnabled(&self, benable: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; +} +impl IAudioLoudness_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetEnabled(this: *mut core::ffi::c_void, pbenabled: *mut windows_core::BOOL) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioLoudness_Impl::GetEnabled(this) { + Ok(ok__) => { + pbenabled.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetEnabled(this: *mut core::ffi::c_void, benable: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioLoudness_Impl::SetEnabled(this, core::mem::transmute_copy(&benable), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetEnabled: GetEnabled::, + SetEnabled: SetEnabled::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioLoudness {} +windows_core::imp::define_interface!(IAudioMidrange, IAudioMidrange_Vtbl, 0x5e54b6d7_b44b_40d9_9a9e_e691d9ce6edf); +impl core::ops::Deref for IAudioMidrange { + type Target = IPerChannelDbLevel; + fn deref(&self) -> &Self::Target { + unsafe { core::mem::transmute(self) } + } +} +windows_core::imp::interface_hierarchy!(IAudioMidrange, windows_core::IUnknown, IPerChannelDbLevel); +#[repr(C)] +#[doc(hidden)] +pub struct IAudioMidrange_Vtbl { + pub base__: IPerChannelDbLevel_Vtbl, +} +pub trait IAudioMidrange_Impl: IPerChannelDbLevel_Impl {} +impl IAudioMidrange_Vtbl { + pub const fn new() -> Self { + Self { base__: IPerChannelDbLevel_Vtbl::new::() } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID || iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioMidrange {} +windows_core::imp::define_interface!(IAudioMute, IAudioMute_Vtbl, 0xdf45aeea_b74a_4b6b_afad_2366b6aa012e); +windows_core::imp::interface_hierarchy!(IAudioMute, windows_core::IUnknown); +impl IAudioMute { + pub unsafe fn SetMute(&self, bmuted: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.into(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } + pub unsafe fn GetMute(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetMute)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioMute_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub SetMute: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, *const windows_core::GUID) -> windows_core::HRESULT, + pub GetMute: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT, +} +pub trait IAudioMute_Impl: windows_core::IUnknownImpl { + fn SetMute(&self, bmuted: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn GetMute(&self) -> windows_core::Result; +} +impl IAudioMute_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn SetMute(this: *mut core::ffi::c_void, bmuted: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioMute_Impl::SetMute(this, core::mem::transmute_copy(&bmuted), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn GetMute(this: *mut core::ffi::c_void, pbmuted: *mut windows_core::BOOL) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioMute_Impl::GetMute(this) { + Ok(ok__) => { + pbmuted.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), SetMute: SetMute::, GetMute: GetMute:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioMute {} +windows_core::imp::define_interface!(IAudioOutputSelector, IAudioOutputSelector_Vtbl, 0xbb515f69_94a7_429e_8b9c_271b3f11a3ab); +windows_core::imp::interface_hierarchy!(IAudioOutputSelector, windows_core::IUnknown); +impl IAudioOutputSelector { + pub unsafe fn GetSelection(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn SetSelection(&self, nidselect: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioOutputSelector_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetSelection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub SetSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IAudioOutputSelector_Impl: windows_core::IUnknownImpl { + fn GetSelection(&self) -> windows_core::Result; + fn SetSelection(&self, nidselect: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; +} +impl IAudioOutputSelector_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetSelection(this: *mut core::ffi::c_void, pnidselected: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioOutputSelector_Impl::GetSelection(this) { + Ok(ok__) => { + pnidselected.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetSelection(this: *mut core::ffi::c_void, nidselect: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioOutputSelector_Impl::SetSelection(this, core::mem::transmute_copy(&nidselect), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetSelection: GetSelection::, + SetSelection: SetSelection::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioOutputSelector {} +windows_core::imp::define_interface!(IAudioPeakMeter, IAudioPeakMeter_Vtbl, 0xdd79923c_0599_45e0_b8b6_c8df7db6e796); +windows_core::imp::interface_hierarchy!(IAudioPeakMeter, windows_core::IUnknown); +impl IAudioPeakMeter { + pub unsafe fn GetChannelCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetLevel(&self, nchannel: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetLevel)(windows_core::Interface::as_raw(self), nchannel, &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioPeakMeter_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetLevel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT, +} +pub trait IAudioPeakMeter_Impl: windows_core::IUnknownImpl { + fn GetChannelCount(&self) -> windows_core::Result; + fn GetLevel(&self, nchannel: u32) -> windows_core::Result; +} +impl IAudioPeakMeter_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetChannelCount(this: *mut core::ffi::c_void, pcchannels: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioPeakMeter_Impl::GetChannelCount(this) { + Ok(ok__) => { + pcchannels.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetLevel(this: *mut core::ffi::c_void, nchannel: u32, pflevel: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioPeakMeter_Impl::GetLevel(this, core::mem::transmute_copy(&nchannel)) { + Ok(ok__) => { + pflevel.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetChannelCount: GetChannelCount::, + GetLevel: GetLevel::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioPeakMeter {} +windows_core::imp::define_interface!(IAudioTreble, IAudioTreble_Vtbl, 0x0a717812_694e_4907_b74b_bafa5cfdca7b); +impl core::ops::Deref for IAudioTreble { + type Target = IPerChannelDbLevel; + fn deref(&self) -> &Self::Target { + unsafe { core::mem::transmute(self) } + } +} +windows_core::imp::interface_hierarchy!(IAudioTreble, windows_core::IUnknown, IPerChannelDbLevel); +#[repr(C)] +#[doc(hidden)] +pub struct IAudioTreble_Vtbl { + pub base__: IPerChannelDbLevel_Vtbl, +} +pub trait IAudioTreble_Impl: IPerChannelDbLevel_Impl {} +impl IAudioTreble_Vtbl { + pub const fn new() -> Self { + Self { base__: IPerChannelDbLevel_Vtbl::new::() } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID || iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioTreble {} +windows_core::imp::define_interface!(IAudioVolumeLevel, IAudioVolumeLevel_Vtbl, 0x7fb7b48f_531d_44a2_bcb3_5ad5a134b3dc); +impl core::ops::Deref for IAudioVolumeLevel { + type Target = IPerChannelDbLevel; + fn deref(&self) -> &Self::Target { + unsafe { core::mem::transmute(self) } + } +} +windows_core::imp::interface_hierarchy!(IAudioVolumeLevel, windows_core::IUnknown, IPerChannelDbLevel); +#[repr(C)] +#[doc(hidden)] +pub struct IAudioVolumeLevel_Vtbl { + pub base__: IPerChannelDbLevel_Vtbl, +} +pub trait IAudioVolumeLevel_Impl: IPerChannelDbLevel_Impl {} +impl IAudioVolumeLevel_Vtbl { + pub const fn new() -> Self { + Self { base__: IPerChannelDbLevel_Vtbl::new::() } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID || iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioVolumeLevel {} +windows_core::imp::define_interface!(IConnector, IConnector_Vtbl, 0x9c2c4058_23f5_41de_877a_df3af236a09e); +windows_core::imp::interface_hierarchy!(IConnector, windows_core::IUnknown); +impl IConnector { + pub unsafe fn GetType(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetDataFlow(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetDataFlow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn ConnectTo(&self, pconnectto: P0) -> windows_core::HRESULT + where + P0: windows_core::Param, + { + unsafe { (windows_core::Interface::vtable(self).ConnectTo)(windows_core::Interface::as_raw(self), pconnectto.param().abi()) } + } + pub unsafe fn Disconnect(&self) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self)) } + } + pub unsafe fn IsConnected(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).IsConnected)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetConnectedTo(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetConnectedTo)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn GetConnectorIdConnectedTo(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetConnectorIdConnectedTo)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetDeviceIdConnectedTo(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetDeviceIdConnectedTo)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IConnector_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ConnectorType) -> windows_core::HRESULT, + pub GetDataFlow: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DataFlow) -> windows_core::HRESULT, + pub ConnectTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, + pub Disconnect: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, + pub IsConnected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT, + pub GetConnectedTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub GetConnectorIdConnectedTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, + pub GetDeviceIdConnectedTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, +} +pub trait IConnector_Impl: windows_core::IUnknownImpl { + fn GetType(&self) -> windows_core::Result; + fn GetDataFlow(&self) -> windows_core::Result; + fn ConnectTo(&self, pconnectto: windows_core::Ref) -> windows_core::Result<()>; + fn Disconnect(&self) -> windows_core::Result<()>; + fn IsConnected(&self) -> windows_core::Result; + fn GetConnectedTo(&self) -> windows_core::Result; + fn GetConnectorIdConnectedTo(&self) -> windows_core::Result; + fn GetDeviceIdConnectedTo(&self) -> windows_core::Result; +} +impl IConnector_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetType(this: *mut core::ffi::c_void, ptype: *mut ConnectorType) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IConnector_Impl::GetType(this) { + Ok(ok__) => { + ptype.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetDataFlow(this: *mut core::ffi::c_void, pflow: *mut DataFlow) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IConnector_Impl::GetDataFlow(this) { + Ok(ok__) => { + pflow.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn ConnectTo(this: *mut core::ffi::c_void, pconnectto: *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IConnector_Impl::ConnectTo(this, core::mem::transmute_copy(&pconnectto)).into() + } + } + unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IConnector_Impl::Disconnect(this).into() + } + } + unsafe extern "system" fn IsConnected(this: *mut core::ffi::c_void, pbconnected: *mut windows_core::BOOL) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IConnector_Impl::IsConnected(this) { + Ok(ok__) => { + pbconnected.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetConnectedTo(this: *mut core::ffi::c_void, ppconto: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IConnector_Impl::GetConnectedTo(this) { + Ok(ok__) => { + ppconto.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetConnectorIdConnectedTo(this: *mut core::ffi::c_void, ppwstrconnectorid: *mut windows_core::PWSTR) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IConnector_Impl::GetConnectorIdConnectedTo(this) { + Ok(ok__) => { + ppwstrconnectorid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetDeviceIdConnectedTo(this: *mut core::ffi::c_void, ppwstrdeviceid: *mut windows_core::PWSTR) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IConnector_Impl::GetDeviceIdConnectedTo(this) { + Ok(ok__) => { + ppwstrdeviceid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetType: GetType::, + GetDataFlow: GetDataFlow::, + ConnectTo: ConnectTo::, + Disconnect: Disconnect::, + IsConnected: IsConnected::, + GetConnectedTo: GetConnectedTo::, + GetConnectorIdConnectedTo: GetConnectorIdConnectedTo::, + GetDeviceIdConnectedTo: GetDeviceIdConnectedTo::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IConnector {} +windows_core::imp::define_interface!(IControlChangeNotify, IControlChangeNotify_Vtbl, 0xa09513ed_c709_4d21_bd7b_5f34c47f3947); +windows_core::imp::interface_hierarchy!(IControlChangeNotify, windows_core::IUnknown); +impl IControlChangeNotify { + pub unsafe fn OnNotify(&self, dwsenderprocessid: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), dwsenderprocessid, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IControlChangeNotify_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub OnNotify: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IControlChangeNotify_Impl: windows_core::IUnknownImpl { + fn OnNotify(&self, dwsenderprocessid: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; +} +impl IControlChangeNotify_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn OnNotify(this: *mut core::ffi::c_void, dwsenderprocessid: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IControlChangeNotify_Impl::OnNotify(this, core::mem::transmute_copy(&dwsenderprocessid), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), OnNotify: OnNotify:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IControlChangeNotify {} +windows_core::imp::define_interface!(IControlInterface, IControlInterface_Vtbl, 0x45d37c3f_5140_444a_ae24_400789f3cbf3); +windows_core::imp::interface_hierarchy!(IControlInterface, windows_core::IUnknown); +impl IControlInterface { + pub unsafe fn GetName(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetIID(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetIID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IControlInterface_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, + pub GetIID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IControlInterface_Impl: windows_core::IUnknownImpl { + fn GetName(&self) -> windows_core::Result; + fn GetIID(&self) -> windows_core::Result; +} +impl IControlInterface_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetName(this: *mut core::ffi::c_void, ppwstrname: *mut windows_core::PWSTR) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IControlInterface_Impl::GetName(this) { + Ok(ok__) => { + ppwstrname.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetIID(this: *mut core::ffi::c_void, piid: *mut windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IControlInterface_Impl::GetIID(this) { + Ok(ok__) => { + piid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), GetName: GetName::, GetIID: GetIID:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IControlInterface {} +windows_core::imp::define_interface!(IDeviceSpecificProperty, IDeviceSpecificProperty_Vtbl, 0x3b22bcbf_2586_4af0_8583_205d391b807c); +windows_core::imp::interface_hierarchy!(IDeviceSpecificProperty, windows_core::IUnknown); +impl IDeviceSpecificProperty { + #[cfg(feature = "wtypes")] + pub unsafe fn GetType(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetValue(&self, pvvalue: *mut core::ffi::c_void, pcbvalue: *mut u32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), pvvalue as _, pcbvalue as _) } + } + pub unsafe fn SetValue(&self, pvvalue: *const core::ffi::c_void, cbvalue: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), pvvalue, cbvalue, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } + pub unsafe fn Get4BRange(&self, plmin: *mut i32, plmax: *mut i32, plstepping: *mut i32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).Get4BRange)(windows_core::Interface::as_raw(self), plmin as _, plmax as _, plstepping as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IDeviceSpecificProperty_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + #[cfg(feature = "wtypes")] + pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::wtypes::VARTYPE) -> windows_core::HRESULT, + #[cfg(not(feature = "wtypes"))] + GetType: usize, + pub GetValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub SetValue: unsafe extern "system" fn(*mut core::ffi::c_void, *const core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, + pub Get4BRange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32, *mut i32, *mut i32) -> windows_core::HRESULT, +} +#[cfg(feature = "wtypes")] +pub trait IDeviceSpecificProperty_Impl: windows_core::IUnknownImpl { + fn GetType(&self) -> windows_core::Result; + fn GetValue(&self, pvvalue: *mut core::ffi::c_void, pcbvalue: *mut u32) -> windows_core::Result<()>; + fn SetValue(&self, pvvalue: *const core::ffi::c_void, cbvalue: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn Get4BRange(&self, plmin: *mut i32, plmax: *mut i32, plstepping: *mut i32) -> windows_core::Result<()>; +} +#[cfg(feature = "wtypes")] +impl IDeviceSpecificProperty_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetType(this: *mut core::ffi::c_void, pvtype: *mut super::wtypes::VARTYPE) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceSpecificProperty_Impl::GetType(this) { + Ok(ok__) => { + pvtype.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetValue(this: *mut core::ffi::c_void, pvvalue: *mut core::ffi::c_void, pcbvalue: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDeviceSpecificProperty_Impl::GetValue(this, core::mem::transmute_copy(&pvvalue), core::mem::transmute_copy(&pcbvalue)).into() + } + } + unsafe extern "system" fn SetValue(this: *mut core::ffi::c_void, pvvalue: *const core::ffi::c_void, cbvalue: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDeviceSpecificProperty_Impl::SetValue(this, core::mem::transmute_copy(&pvvalue), core::mem::transmute_copy(&cbvalue), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn Get4BRange(this: *mut core::ffi::c_void, plmin: *mut i32, plmax: *mut i32, plstepping: *mut i32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDeviceSpecificProperty_Impl::Get4BRange(this, core::mem::transmute_copy(&plmin), core::mem::transmute_copy(&plmax), core::mem::transmute_copy(&plstepping)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetType: GetType::, + GetValue: GetValue::, + SetValue: SetValue::, + Get4BRange: Get4BRange::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(feature = "wtypes")] +impl windows_core::RuntimeName for IDeviceSpecificProperty {} +windows_core::imp::define_interface!(IDeviceTopology, IDeviceTopology_Vtbl, 0x2a07407e_6497_4a18_9787_32f79bd0d98f); +windows_core::imp::interface_hierarchy!(IDeviceTopology, windows_core::IUnknown); +impl IDeviceTopology { + pub unsafe fn GetConnectorCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetConnectorCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetConnector(&self, nindex: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetConnector)(windows_core::Interface::as_raw(self), nindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn GetSubunitCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetSubunitCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetSubunit(&self, nindex: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetSubunit)(windows_core::Interface::as_raw(self), nindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn GetPartById(&self, nid: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetPartById)(windows_core::Interface::as_raw(self), nid, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn GetDeviceId(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetDeviceId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetSignalPath(&self, pipartfrom: P0, pipartto: P1, brejectmixedpaths: bool) -> windows_core::Result + where + P0: windows_core::Param, + P1: windows_core::Param, + { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetSignalPath)(windows_core::Interface::as_raw(self), pipartfrom.param().abi(), pipartto.param().abi(), brejectmixedpaths.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IDeviceTopology_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetConnectorCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetConnector: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub GetSubunitCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetSubunit: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub GetPartById: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub GetDeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, + pub GetSignalPath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, +} +pub trait IDeviceTopology_Impl: windows_core::IUnknownImpl { + fn GetConnectorCount(&self) -> windows_core::Result; + fn GetConnector(&self, nindex: u32) -> windows_core::Result; + fn GetSubunitCount(&self) -> windows_core::Result; + fn GetSubunit(&self, nindex: u32) -> windows_core::Result; + fn GetPartById(&self, nid: u32) -> windows_core::Result; + fn GetDeviceId(&self) -> windows_core::Result; + fn GetSignalPath(&self, pipartfrom: windows_core::Ref, pipartto: windows_core::Ref, brejectmixedpaths: windows_core::BOOL) -> windows_core::Result; +} +impl IDeviceTopology_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetConnectorCount(this: *mut core::ffi::c_void, pcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetConnectorCount(this) { + Ok(ok__) => { + pcount.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetConnector(this: *mut core::ffi::c_void, nindex: u32, ppconnector: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetConnector(this, core::mem::transmute_copy(&nindex)) { + Ok(ok__) => { + ppconnector.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetSubunitCount(this: *mut core::ffi::c_void, pcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetSubunitCount(this) { + Ok(ok__) => { + pcount.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetSubunit(this: *mut core::ffi::c_void, nindex: u32, ppsubunit: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetSubunit(this, core::mem::transmute_copy(&nindex)) { + Ok(ok__) => { + ppsubunit.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetPartById(this: *mut core::ffi::c_void, nid: u32, pppart: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetPartById(this, core::mem::transmute_copy(&nid)) { + Ok(ok__) => { + pppart.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetDeviceId(this: *mut core::ffi::c_void, ppwstrdeviceid: *mut windows_core::PWSTR) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetDeviceId(this) { + Ok(ok__) => { + ppwstrdeviceid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetSignalPath(this: *mut core::ffi::c_void, pipartfrom: *mut core::ffi::c_void, pipartto: *mut core::ffi::c_void, brejectmixedpaths: windows_core::BOOL, ppparts: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IDeviceTopology_Impl::GetSignalPath(this, core::mem::transmute_copy(&pipartfrom), core::mem::transmute_copy(&pipartto), core::mem::transmute_copy(&brejectmixedpaths)) { + Ok(ok__) => { + ppparts.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetConnectorCount: GetConnectorCount::, + GetConnector: GetConnector::, + GetSubunitCount: GetSubunitCount::, + GetSubunit: GetSubunit::, + GetPartById: GetPartById::, + GetDeviceId: GetDeviceId::, + GetSignalPath: GetSignalPath::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IDeviceTopology {} +windows_core::imp::define_interface!(IKsControl, IKsControl_Vtbl, 0x28f54685_06fd_11d2_b27a_00a0c9223196); +windows_core::imp::interface_hierarchy!(IKsControl, windows_core::IUnknown); +impl IKsControl { + #[cfg(feature = "ks")] + pub unsafe fn KsProperty(&self, property: *const super::ks::KSIDENTIFIER, propertylength: u32, propertydata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).KsProperty)(windows_core::Interface::as_raw(self), property, propertylength, propertydata as _, datalength, bytesreturned as _) } + } + #[cfg(feature = "ks")] + pub unsafe fn KsMethod(&self, method: *const super::ks::KSIDENTIFIER, methodlength: u32, methoddata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).KsMethod)(windows_core::Interface::as_raw(self), method, methodlength, methoddata as _, datalength, bytesreturned as _) } + } + #[cfg(feature = "ks")] + pub unsafe fn KsEvent(&self, event: *const super::ks::KSIDENTIFIER, eventlength: u32, eventdata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).KsEvent)(windows_core::Interface::as_raw(self), event, eventlength, eventdata as _, datalength, bytesreturned as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsControl_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + #[cfg(feature = "ks")] + pub KsProperty: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ks::KSIDENTIFIER, u32, *mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ks"))] + KsProperty: usize, + #[cfg(feature = "ks")] + pub KsMethod: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ks::KSIDENTIFIER, u32, *mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ks"))] + KsMethod: usize, + #[cfg(feature = "ks")] + pub KsEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ks::KSIDENTIFIER, u32, *mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ks"))] + KsEvent: usize, +} +#[cfg(feature = "ks")] +pub trait IKsControl_Impl: windows_core::IUnknownImpl { + fn KsProperty(&self, property: *const super::ks::KSIDENTIFIER, propertylength: u32, propertydata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::Result<()>; + fn KsMethod(&self, method: *const super::ks::KSIDENTIFIER, methodlength: u32, methoddata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::Result<()>; + fn KsEvent(&self, event: *const super::ks::KSIDENTIFIER, eventlength: u32, eventdata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::Result<()>; +} +#[cfg(feature = "ks")] +impl IKsControl_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn KsProperty(this: *mut core::ffi::c_void, property: *const super::ks::KSIDENTIFIER, propertylength: u32, propertydata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKsControl_Impl::KsProperty(this, core::mem::transmute_copy(&property), core::mem::transmute_copy(&propertylength), core::mem::transmute_copy(&propertydata), core::mem::transmute_copy(&datalength), core::mem::transmute_copy(&bytesreturned)).into() + } + } + unsafe extern "system" fn KsMethod(this: *mut core::ffi::c_void, method: *const super::ks::KSIDENTIFIER, methodlength: u32, methoddata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKsControl_Impl::KsMethod(this, core::mem::transmute_copy(&method), core::mem::transmute_copy(&methodlength), core::mem::transmute_copy(&methoddata), core::mem::transmute_copy(&datalength), core::mem::transmute_copy(&bytesreturned)).into() + } + } + unsafe extern "system" fn KsEvent(this: *mut core::ffi::c_void, event: *const super::ks::KSIDENTIFIER, eventlength: u32, eventdata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKsControl_Impl::KsEvent(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&eventlength), core::mem::transmute_copy(&eventdata), core::mem::transmute_copy(&datalength), core::mem::transmute_copy(&bytesreturned)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + KsProperty: KsProperty::, + KsMethod: KsMethod::, + KsEvent: KsEvent::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(feature = "ks")] +impl windows_core::RuntimeName for IKsControl {} +windows_core::imp::define_interface!(IKsFormatSupport, IKsFormatSupport_Vtbl, 0x3cb4a69d_bb6f_4d2b_95b7_452d2c155db5); +windows_core::imp::interface_hierarchy!(IKsFormatSupport, windows_core::IUnknown); +impl IKsFormatSupport { + #[cfg(feature = "ks")] + pub unsafe fn IsFormatSupported(&self, pksformat: *const super::ks::KSDATARANGE, cbformat: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), pksformat, cbformat, &mut result__).map(|| result__) + } + } + #[cfg(feature = "ks")] + pub unsafe fn GetDevicePreferredFormat(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetDevicePreferredFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsFormatSupport_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + #[cfg(feature = "ks")] + pub IsFormatSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ks::KSDATARANGE, u32, *mut windows_core::BOOL) -> windows_core::HRESULT, + #[cfg(not(feature = "ks"))] + IsFormatSupported: usize, + #[cfg(feature = "ks")] + pub GetDevicePreferredFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ks::PKSDATAFORMAT) -> windows_core::HRESULT, + #[cfg(not(feature = "ks"))] + GetDevicePreferredFormat: usize, +} +#[cfg(feature = "ks")] +pub trait IKsFormatSupport_Impl: windows_core::IUnknownImpl { + fn IsFormatSupported(&self, pksformat: *const super::ks::KSDATARANGE, cbformat: u32) -> windows_core::Result; + fn GetDevicePreferredFormat(&self) -> windows_core::Result; +} +#[cfg(feature = "ks")] +impl IKsFormatSupport_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn IsFormatSupported(this: *mut core::ffi::c_void, pksformat: *const super::ks::KSDATARANGE, cbformat: u32, pbsupported: *mut windows_core::BOOL) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsFormatSupport_Impl::IsFormatSupported(this, core::mem::transmute_copy(&pksformat), core::mem::transmute_copy(&cbformat)) { + Ok(ok__) => { + pbsupported.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetDevicePreferredFormat(this: *mut core::ffi::c_void, ppksformat: *mut super::ks::PKSDATAFORMAT) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsFormatSupport_Impl::GetDevicePreferredFormat(this) { + Ok(ok__) => { + ppksformat.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + IsFormatSupported: IsFormatSupported::, + GetDevicePreferredFormat: GetDevicePreferredFormat::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(feature = "ks")] +impl windows_core::RuntimeName for IKsFormatSupport {} +windows_core::imp::define_interface!(IKsJackContainerId, IKsJackContainerId_Vtbl, 0xc99af463_d629_4ec4_8c00_e54d68154248); +windows_core::imp::interface_hierarchy!(IKsJackContainerId, windows_core::IUnknown); +impl IKsJackContainerId { + pub unsafe fn GetJackContainerId(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetJackContainerId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsJackContainerId_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetJackContainerId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IKsJackContainerId_Impl: windows_core::IUnknownImpl { + fn GetJackContainerId(&self) -> windows_core::Result; +} +impl IKsJackContainerId_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetJackContainerId(this: *mut core::ffi::c_void, pjackcontainerid: *mut windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsJackContainerId_Impl::GetJackContainerId(this) { + Ok(ok__) => { + pjackcontainerid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), GetJackContainerId: GetJackContainerId:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IKsJackContainerId {} +windows_core::imp::define_interface!(IKsJackDescription, IKsJackDescription_Vtbl, 0x4509f757_2d46_4637_8e62_ce7db944f57b); +windows_core::imp::interface_hierarchy!(IKsJackDescription, windows_core::IUnknown); +impl IKsJackDescription { + pub unsafe fn GetJackCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetJackCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + #[cfg(feature = "ksmedia")] + pub unsafe fn GetJackDescription(&self, njack: u32, pdescription: *mut super::ksmedia::KSJACK_DESCRIPTION) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetJackDescription)(windows_core::Interface::as_raw(self), njack, pdescription as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsJackDescription_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetJackCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub GetJackDescription: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::ksmedia::KSJACK_DESCRIPTION) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + GetJackDescription: usize, +} +#[cfg(feature = "ksmedia")] +pub trait IKsJackDescription_Impl: windows_core::IUnknownImpl { + fn GetJackCount(&self) -> windows_core::Result; + fn GetJackDescription(&self, njack: u32, pdescription: *mut super::ksmedia::KSJACK_DESCRIPTION) -> windows_core::Result<()>; +} +#[cfg(feature = "ksmedia")] +impl IKsJackDescription_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetJackCount(this: *mut core::ffi::c_void, pcjacks: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsJackDescription_Impl::GetJackCount(this) { + Ok(ok__) => { + pcjacks.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetJackDescription(this: *mut core::ffi::c_void, njack: u32, pdescription: *mut super::ksmedia::KSJACK_DESCRIPTION) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKsJackDescription_Impl::GetJackDescription(this, core::mem::transmute_copy(&njack), core::mem::transmute_copy(&pdescription)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetJackCount: GetJackCount::, + GetJackDescription: GetJackDescription::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(feature = "ksmedia")] +impl windows_core::RuntimeName for IKsJackDescription {} +windows_core::imp::define_interface!(IKsJackDescription2, IKsJackDescription2_Vtbl, 0x478f3a9b_e0c9_4827_9228_6f5505ffe76a); +windows_core::imp::interface_hierarchy!(IKsJackDescription2, windows_core::IUnknown); +impl IKsJackDescription2 { + pub unsafe fn GetJackCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetJackCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + #[cfg(feature = "ksmedia")] + pub unsafe fn GetJackDescription2(&self, njack: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetJackDescription2)(windows_core::Interface::as_raw(self), njack, &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsJackDescription2_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetJackCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub GetJackDescription2: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::ksmedia::KSJACK_DESCRIPTION2) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + GetJackDescription2: usize, +} +#[cfg(feature = "ksmedia")] +pub trait IKsJackDescription2_Impl: windows_core::IUnknownImpl { + fn GetJackCount(&self) -> windows_core::Result; + fn GetJackDescription2(&self, njack: u32) -> windows_core::Result; +} +#[cfg(feature = "ksmedia")] +impl IKsJackDescription2_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetJackCount(this: *mut core::ffi::c_void, pcjacks: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsJackDescription2_Impl::GetJackCount(this) { + Ok(ok__) => { + pcjacks.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetJackDescription2(this: *mut core::ffi::c_void, njack: u32, pdescription2: *mut super::ksmedia::KSJACK_DESCRIPTION2) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsJackDescription2_Impl::GetJackDescription2(this, core::mem::transmute_copy(&njack)) { + Ok(ok__) => { + pdescription2.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetJackCount: GetJackCount::, + GetJackDescription2: GetJackDescription2::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(feature = "ksmedia")] +impl windows_core::RuntimeName for IKsJackDescription2 {} +windows_core::imp::define_interface!(IKsJackDescription3, IKsJackDescription3_Vtbl, 0xe3f6778b_6660_4cc8_a291_ecc4192d9967); +windows_core::imp::interface_hierarchy!(IKsJackDescription3, windows_core::IUnknown); +impl IKsJackDescription3 { + pub unsafe fn GetJackCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetJackCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + #[cfg(feature = "ksmedia")] + pub unsafe fn GetJackDescription3(&self, njack: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetJackDescription3)(windows_core::Interface::as_raw(self), njack, &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsJackDescription3_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetJackCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub GetJackDescription3: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::ksmedia::KSJACK_DESCRIPTION3) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + GetJackDescription3: usize, +} +#[cfg(feature = "ksmedia")] +pub trait IKsJackDescription3_Impl: windows_core::IUnknownImpl { + fn GetJackCount(&self) -> windows_core::Result; + fn GetJackDescription3(&self, njack: u32) -> windows_core::Result; +} +#[cfg(feature = "ksmedia")] +impl IKsJackDescription3_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetJackCount(this: *mut core::ffi::c_void, pcjacks: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsJackDescription3_Impl::GetJackCount(this) { + Ok(ok__) => { + pcjacks.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetJackDescription3(this: *mut core::ffi::c_void, njack: u32, pdescription3: *mut super::ksmedia::KSJACK_DESCRIPTION3) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IKsJackDescription3_Impl::GetJackDescription3(this, core::mem::transmute_copy(&njack)) { + Ok(ok__) => { + pdescription3.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetJackCount: GetJackCount::, + GetJackDescription3: GetJackDescription3::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(feature = "ksmedia")] +impl windows_core::RuntimeName for IKsJackDescription3 {} +windows_core::imp::define_interface!(IKsJackSinkInformation, IKsJackSinkInformation_Vtbl, 0xd9bd72ed_290f_4581_9ff3_61027a8fe532); +windows_core::imp::interface_hierarchy!(IKsJackSinkInformation, windows_core::IUnknown); +impl IKsJackSinkInformation { + #[cfg(all(feature = "ksmedia", feature = "winnt"))] + pub unsafe fn GetJackSinkInformation(&self, pjacksinkinformation: *mut super::ksmedia::KSJACK_SINK_INFORMATION) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetJackSinkInformation)(windows_core::Interface::as_raw(self), pjacksinkinformation as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IKsJackSinkInformation_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + #[cfg(all(feature = "ksmedia", feature = "winnt"))] + pub GetJackSinkInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::KSJACK_SINK_INFORMATION) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ksmedia", feature = "winnt")))] + GetJackSinkInformation: usize, +} +#[cfg(all(feature = "ksmedia", feature = "winnt"))] +pub trait IKsJackSinkInformation_Impl: windows_core::IUnknownImpl { + fn GetJackSinkInformation(&self, pjacksinkinformation: *mut super::ksmedia::KSJACK_SINK_INFORMATION) -> windows_core::Result<()>; +} +#[cfg(all(feature = "ksmedia", feature = "winnt"))] +impl IKsJackSinkInformation_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetJackSinkInformation(this: *mut core::ffi::c_void, pjacksinkinformation: *mut super::ksmedia::KSJACK_SINK_INFORMATION) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKsJackSinkInformation_Impl::GetJackSinkInformation(this, core::mem::transmute_copy(&pjacksinkinformation)).into() + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), GetJackSinkInformation: GetJackSinkInformation:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[cfg(all(feature = "ksmedia", feature = "winnt"))] +impl windows_core::RuntimeName for IKsJackSinkInformation {} +windows_core::imp::define_interface!(IPart, IPart_Vtbl, 0xae2de0e4_5bca_4f2d_aa46_5d13f8fdb3a9); +windows_core::imp::interface_hierarchy!(IPart, windows_core::IUnknown); +impl IPart { + pub unsafe fn GetName(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetLocalId(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetLocalId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetGlobalId(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetGlobalId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetPartType(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetPartType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetSubType(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetSubType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetControlInterfaceCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetControlInterfaceCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetControlInterface(&self, nindex: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetControlInterface)(windows_core::Interface::as_raw(self), nindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn EnumPartsIncoming(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).EnumPartsIncoming)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn EnumPartsOutgoing(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).EnumPartsOutgoing)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn GetTopologyObject(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetTopologyObject)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } + pub unsafe fn Activate(&self, dwclscontext: u32, refiid: *const windows_core::GUID, ppvobject: Option<*mut *mut core::ffi::c_void>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), dwclscontext, refiid, ppvobject.unwrap_or(core::mem::zeroed()) as _) } + } + pub unsafe fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: P1) -> windows_core::HRESULT + where + P1: windows_core::Param, + { + unsafe { (windows_core::Interface::vtable(self).RegisterControlChangeCallback)(windows_core::Interface::as_raw(self), riid, pnotify.param().abi()) } + } + pub unsafe fn UnregisterControlChangeCallback(&self, pnotify: P0) -> windows_core::HRESULT + where + P0: windows_core::Param, + { + unsafe { (windows_core::Interface::vtable(self).UnregisterControlChangeCallback)(windows_core::Interface::as_raw(self), pnotify.param().abi()) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IPart_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, + pub GetLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetGlobalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, + pub GetPartType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PartType) -> windows_core::HRESULT, + pub GetSubType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT, + pub GetControlInterfaceCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetControlInterface: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub EnumPartsIncoming: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub EnumPartsOutgoing: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub GetTopologyObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub Activate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, + pub RegisterControlChangeCallback: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, + pub UnregisterControlChangeCallback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, +} +pub trait IPart_Impl: windows_core::IUnknownImpl { + fn GetName(&self) -> windows_core::Result; + fn GetLocalId(&self) -> windows_core::Result; + fn GetGlobalId(&self) -> windows_core::Result; + fn GetPartType(&self) -> windows_core::Result; + fn GetSubType(&self) -> windows_core::Result; + fn GetControlInterfaceCount(&self) -> windows_core::Result; + fn GetControlInterface(&self, nindex: u32) -> windows_core::Result; + fn EnumPartsIncoming(&self) -> windows_core::Result; + fn EnumPartsOutgoing(&self) -> windows_core::Result; + fn GetTopologyObject(&self) -> windows_core::Result; + fn Activate(&self, dwclscontext: u32, refiid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: windows_core::Ref) -> windows_core::Result<()>; + fn UnregisterControlChangeCallback(&self, pnotify: windows_core::Ref) -> windows_core::Result<()>; +} +impl IPart_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetName(this: *mut core::ffi::c_void, ppwstrname: *mut windows_core::PWSTR) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetName(this) { + Ok(ok__) => { + ppwstrname.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetLocalId(this: *mut core::ffi::c_void, pnid: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetLocalId(this) { + Ok(ok__) => { + pnid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetGlobalId(this: *mut core::ffi::c_void, ppwstrglobalid: *mut windows_core::PWSTR) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetGlobalId(this) { + Ok(ok__) => { + ppwstrglobalid.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetPartType(this: *mut core::ffi::c_void, pparttype: *mut PartType) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetPartType(this) { + Ok(ok__) => { + pparttype.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetSubType(this: *mut core::ffi::c_void, psubtype: *mut windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetSubType(this) { + Ok(ok__) => { + psubtype.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetControlInterfaceCount(this: *mut core::ffi::c_void, pcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetControlInterfaceCount(this) { + Ok(ok__) => { + pcount.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetControlInterface(this: *mut core::ffi::c_void, nindex: u32, ppinterfacedesc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetControlInterface(this, core::mem::transmute_copy(&nindex)) { + Ok(ok__) => { + ppinterfacedesc.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn EnumPartsIncoming(this: *mut core::ffi::c_void, ppparts: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::EnumPartsIncoming(this) { + Ok(ok__) => { + ppparts.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn EnumPartsOutgoing(this: *mut core::ffi::c_void, ppparts: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::EnumPartsOutgoing(this) { + Ok(ok__) => { + ppparts.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetTopologyObject(this: *mut core::ffi::c_void, pptopology: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPart_Impl::GetTopologyObject(this) { + Ok(ok__) => { + pptopology.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn Activate(this: *mut core::ffi::c_void, dwclscontext: u32, refiid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPart_Impl::Activate(this, core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&refiid), core::mem::transmute_copy(&ppvobject)).into() + } + } + unsafe extern "system" fn RegisterControlChangeCallback(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPart_Impl::RegisterControlChangeCallback(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pnotify)).into() + } + } + unsafe extern "system" fn UnregisterControlChangeCallback(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPart_Impl::UnregisterControlChangeCallback(this, core::mem::transmute_copy(&pnotify)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetName: GetName::, + GetLocalId: GetLocalId::, + GetGlobalId: GetGlobalId::, + GetPartType: GetPartType::, + GetSubType: GetSubType::, + GetControlInterfaceCount: GetControlInterfaceCount::, + GetControlInterface: GetControlInterface::, + EnumPartsIncoming: EnumPartsIncoming::, + EnumPartsOutgoing: EnumPartsOutgoing::, + GetTopologyObject: GetTopologyObject::, + Activate: Activate::, + RegisterControlChangeCallback: RegisterControlChangeCallback::, + UnregisterControlChangeCallback: UnregisterControlChangeCallback::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IPart {} +windows_core::imp::define_interface!(IPartsList, IPartsList_Vtbl, 0x6daa848c_5eb0_45cc_aea5_998a2cda1ffb); +windows_core::imp::interface_hierarchy!(IPartsList, windows_core::IUnknown); +impl IPartsList { + pub unsafe fn GetCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetPart(&self, nindex: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetPart)(windows_core::Interface::as_raw(self), nindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IPartsList_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetPart: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, +} +pub trait IPartsList_Impl: windows_core::IUnknownImpl { + fn GetCount(&self) -> windows_core::Result; + fn GetPart(&self, nindex: u32) -> windows_core::Result; +} +impl IPartsList_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetCount(this: *mut core::ffi::c_void, pcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPartsList_Impl::GetCount(this) { + Ok(ok__) => { + pcount.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetPart(this: *mut core::ffi::c_void, nindex: u32, pppart: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPartsList_Impl::GetPart(this, core::mem::transmute_copy(&nindex)) { + Ok(ok__) => { + pppart.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), GetCount: GetCount::, GetPart: GetPart:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IPartsList {} +windows_core::imp::define_interface!(IPerChannelDbLevel, IPerChannelDbLevel_Vtbl, 0xc2f8e001_f205_4bc9_99bc_c13b1e048ccb); +windows_core::imp::interface_hierarchy!(IPerChannelDbLevel, windows_core::IUnknown); +impl IPerChannelDbLevel { + pub unsafe fn GetChannelCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetLevelRange(&self, nchannel: u32, pfminleveldb: *mut f32, pfmaxleveldb: *mut f32, pfstepping: *mut f32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetLevelRange)(windows_core::Interface::as_raw(self), nchannel, pfminleveldb as _, pfmaxleveldb as _, pfstepping as _) } + } + pub unsafe fn GetLevel(&self, nchannel: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetLevel)(windows_core::Interface::as_raw(self), nchannel, &mut result__).map(|| result__) + } + } + pub unsafe fn SetLevel(&self, nchannel: u32, fleveldb: f32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetLevel)(windows_core::Interface::as_raw(self), nchannel, fleveldb, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } + pub unsafe fn SetLevelUniform(&self, fleveldb: f32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetLevelUniform)(windows_core::Interface::as_raw(self), fleveldb, pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } + pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetLevelAllChannels)(windows_core::Interface::as_raw(self), alevelsdb.as_ptr(), alevelsdb.len().try_into().unwrap(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IPerChannelDbLevel_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetLevelRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32, *mut f32, *mut f32) -> windows_core::HRESULT, + pub GetLevel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT, + pub SetLevel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, f32, *const windows_core::GUID) -> windows_core::HRESULT, + pub SetLevelUniform: unsafe extern "system" fn(*mut core::ffi::c_void, f32, *const windows_core::GUID) -> windows_core::HRESULT, + pub SetLevelAllChannels: unsafe extern "system" fn(*mut core::ffi::c_void, *const f32, u32, *const windows_core::GUID) -> windows_core::HRESULT, +} +pub trait IPerChannelDbLevel_Impl: windows_core::IUnknownImpl { + fn GetChannelCount(&self) -> windows_core::Result; + fn GetLevelRange(&self, nchannel: u32, pfminleveldb: *mut f32, pfmaxleveldb: *mut f32, pfstepping: *mut f32) -> windows_core::Result<()>; + fn GetLevel(&self, nchannel: u32) -> windows_core::Result; + fn SetLevel(&self, nchannel: u32, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetLevelUniform(&self, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetLevelAllChannels(&self, alevelsdb: *const f32, cchannels: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; +} +impl IPerChannelDbLevel_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetChannelCount(this: *mut core::ffi::c_void, pcchannels: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPerChannelDbLevel_Impl::GetChannelCount(this) { + Ok(ok__) => { + pcchannels.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetLevelRange(this: *mut core::ffi::c_void, nchannel: u32, pfminleveldb: *mut f32, pfmaxleveldb: *mut f32, pfstepping: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPerChannelDbLevel_Impl::GetLevelRange(this, core::mem::transmute_copy(&nchannel), core::mem::transmute_copy(&pfminleveldb), core::mem::transmute_copy(&pfmaxleveldb), core::mem::transmute_copy(&pfstepping)).into() + } + } + unsafe extern "system" fn GetLevel(this: *mut core::ffi::c_void, nchannel: u32, pfleveldb: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IPerChannelDbLevel_Impl::GetLevel(this, core::mem::transmute_copy(&nchannel)) { + Ok(ok__) => { + pfleveldb.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetLevel(this: *mut core::ffi::c_void, nchannel: u32, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPerChannelDbLevel_Impl::SetLevel(this, core::mem::transmute_copy(&nchannel), core::mem::transmute_copy(&fleveldb), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn SetLevelUniform(this: *mut core::ffi::c_void, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPerChannelDbLevel_Impl::SetLevelUniform(this, core::mem::transmute_copy(&fleveldb), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn SetLevelAllChannels(this: *mut core::ffi::c_void, alevelsdb: *const f32, cchannels: u32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IPerChannelDbLevel_Impl::SetLevelAllChannels(this, core::mem::transmute_copy(&alevelsdb), core::mem::transmute_copy(&cchannels), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetChannelCount: GetChannelCount::, + GetLevelRange: GetLevelRange::, + GetLevel: GetLevel::, + SetLevel: SetLevel::, + SetLevelUniform: SetLevelUniform::, + SetLevelAllChannels: SetLevelAllChannels::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IPerChannelDbLevel {} +windows_core::imp::define_interface!(ISubunit, ISubunit_Vtbl, 0x82149a85_dba6_4487_86bb_ea8f7fefcc71); +windows_core::imp::interface_hierarchy!(ISubunit, windows_core::IUnknown); +#[repr(C)] +#[doc(hidden)] +pub struct ISubunit_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, +} +pub trait ISubunit_Impl: windows_core::IUnknownImpl {} +impl ISubunit_Vtbl { + pub const fn new() -> Self { + Self { base__: windows_core::IUnknown_Vtbl::new::() } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for ISubunit {} +pub const In: DataFlow = 0; +pub const Network: ConnectorType = 5; +pub const Out: DataFlow = 1; +pub type PartType = i32; +pub const Physical_External: ConnectorType = 2; +pub const Physical_Internal: ConnectorType = 1; +pub const Software_Fixed: ConnectorType = 4; +pub const Software_IO: ConnectorType = 3; +pub const Subunit: PartType = 1; +pub const Unknown_Connector: ConnectorType = 0; diff --git a/crates/libs/windows/src/Windows/dsound/mod.rs b/crates/libs/windows/src/Windows/dsound/mod.rs index 20df4c752a..5775a66347 100644 --- a/crates/libs/windows/src/Windows/dsound/mod.rs +++ b/crates/libs/windows/src/Windows/dsound/mod.rs @@ -2881,22 +2881,22 @@ impl windows_core::RuntimeName for IKsPropertySet {} windows_core::imp::define_interface!(IReferenceClock, IReferenceClock_Vtbl, 0x56a86897_0ad4_11ce_b03a_0020af0ba770); windows_core::imp::interface_hierarchy!(IReferenceClock, windows_core::IUnknown); impl IReferenceClock { - #[cfg(feature = "mediaobj")] - pub unsafe fn GetTime(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetTime(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } } - #[cfg(all(feature = "mediaobj", feature = "winnt"))] - pub unsafe fn AdviseTime(&self, rtbasetime: super::mediaobj::REFERENCE_TIME, rtstreamtime: super::mediaobj::REFERENCE_TIME, hevent: super::winnt::HANDLE) -> windows_core::Result { + #[cfg(all(feature = "ksmedia", feature = "winnt"))] + pub unsafe fn AdviseTime(&self, rtbasetime: super::ksmedia::REFERENCE_TIME, rtstreamtime: super::ksmedia::REFERENCE_TIME, hevent: super::winnt::HANDLE) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AdviseTime)(windows_core::Interface::as_raw(self), rtbasetime, rtstreamtime, hevent, &mut result__).map(|| result__) } } - #[cfg(all(feature = "mediaobj", feature = "winnt"))] - pub unsafe fn AdvisePeriodic(&self, rtstarttime: super::mediaobj::REFERENCE_TIME, rtperiodtime: super::mediaobj::REFERENCE_TIME, hsemaphore: super::winnt::HANDLE) -> windows_core::Result { + #[cfg(all(feature = "ksmedia", feature = "winnt"))] + pub unsafe fn AdvisePeriodic(&self, rtstarttime: super::ksmedia::REFERENCE_TIME, rtperiodtime: super::ksmedia::REFERENCE_TIME, hsemaphore: super::winnt::HANDLE) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AdvisePeriodic)(windows_core::Interface::as_raw(self), rtstarttime, rtperiodtime, hsemaphore, &mut result__).map(|| result__) @@ -2910,31 +2910,31 @@ impl IReferenceClock { #[doc(hidden)] pub struct IReferenceClock_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(feature = "mediaobj")] - pub GetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetTime: usize, - #[cfg(all(feature = "mediaobj", feature = "winnt"))] - pub AdviseTime: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME, super::mediaobj::REFERENCE_TIME, super::winnt::HANDLE, *mut u32) -> windows_core::HRESULT, - #[cfg(not(all(feature = "mediaobj", feature = "winnt")))] + #[cfg(all(feature = "ksmedia", feature = "winnt"))] + pub AdviseTime: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME, super::ksmedia::REFERENCE_TIME, super::winnt::HANDLE, *mut u32) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ksmedia", feature = "winnt")))] AdviseTime: usize, - #[cfg(all(feature = "mediaobj", feature = "winnt"))] - pub AdvisePeriodic: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME, super::mediaobj::REFERENCE_TIME, super::winnt::HANDLE, *mut u32) -> windows_core::HRESULT, - #[cfg(not(all(feature = "mediaobj", feature = "winnt")))] + #[cfg(all(feature = "ksmedia", feature = "winnt"))] + pub AdvisePeriodic: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME, super::ksmedia::REFERENCE_TIME, super::winnt::HANDLE, *mut u32) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ksmedia", feature = "winnt")))] AdvisePeriodic: usize, pub Unadvise: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } -#[cfg(all(feature = "mediaobj", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "winnt"))] pub trait IReferenceClock_Impl: windows_core::IUnknownImpl { - fn GetTime(&self) -> windows_core::Result; - fn AdviseTime(&self, rtbasetime: super::mediaobj::REFERENCE_TIME, rtstreamtime: super::mediaobj::REFERENCE_TIME, hevent: super::winnt::HANDLE) -> windows_core::Result; - fn AdvisePeriodic(&self, rtstarttime: super::mediaobj::REFERENCE_TIME, rtperiodtime: super::mediaobj::REFERENCE_TIME, hsemaphore: super::winnt::HANDLE) -> windows_core::Result; + fn GetTime(&self) -> windows_core::Result; + fn AdviseTime(&self, rtbasetime: super::ksmedia::REFERENCE_TIME, rtstreamtime: super::ksmedia::REFERENCE_TIME, hevent: super::winnt::HANDLE) -> windows_core::Result; + fn AdvisePeriodic(&self, rtstarttime: super::ksmedia::REFERENCE_TIME, rtperiodtime: super::ksmedia::REFERENCE_TIME, hsemaphore: super::winnt::HANDLE) -> windows_core::Result; fn Unadvise(&self, dwadvisecookie: u32) -> windows_core::Result<()>; } -#[cfg(all(feature = "mediaobj", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "winnt"))] impl IReferenceClock_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn GetTime(this: *mut core::ffi::c_void, ptime: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetTime(this: *mut core::ffi::c_void, ptime: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IReferenceClock_Impl::GetTime(this) { @@ -2946,7 +2946,7 @@ impl IReferenceClock_Vtbl { } } } - unsafe extern "system" fn AdviseTime(this: *mut core::ffi::c_void, rtbasetime: super::mediaobj::REFERENCE_TIME, rtstreamtime: super::mediaobj::REFERENCE_TIME, hevent: super::winnt::HANDLE, pdwadvisecookie: *mut u32) -> windows_core::HRESULT { + unsafe extern "system" fn AdviseTime(this: *mut core::ffi::c_void, rtbasetime: super::ksmedia::REFERENCE_TIME, rtstreamtime: super::ksmedia::REFERENCE_TIME, hevent: super::winnt::HANDLE, pdwadvisecookie: *mut u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IReferenceClock_Impl::AdviseTime(this, core::mem::transmute_copy(&rtbasetime), core::mem::transmute_copy(&rtstreamtime), core::mem::transmute_copy(&hevent)) { @@ -2958,7 +2958,7 @@ impl IReferenceClock_Vtbl { } } } - unsafe extern "system" fn AdvisePeriodic(this: *mut core::ffi::c_void, rtstarttime: super::mediaobj::REFERENCE_TIME, rtperiodtime: super::mediaobj::REFERENCE_TIME, hsemaphore: super::winnt::HANDLE, pdwadvisecookie: *mut u32) -> windows_core::HRESULT { + unsafe extern "system" fn AdvisePeriodic(this: *mut core::ffi::c_void, rtstarttime: super::ksmedia::REFERENCE_TIME, rtperiodtime: super::ksmedia::REFERENCE_TIME, hsemaphore: super::winnt::HANDLE, pdwadvisecookie: *mut u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IReferenceClock_Impl::AdvisePeriodic(this, core::mem::transmute_copy(&rtstarttime), core::mem::transmute_copy(&rtperiodtime), core::mem::transmute_copy(&hsemaphore)) { @@ -2988,7 +2988,7 @@ impl IReferenceClock_Vtbl { iid == &::IID } } -#[cfg(all(feature = "mediaobj", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "winnt"))] impl windows_core::RuntimeName for IReferenceClock {} pub const KSPROPERTY_SUPPORT_GET: u32 = 1; pub const KSPROPERTY_SUPPORT_SET: u32 = 2; @@ -3064,5 +3064,5 @@ pub type LPLPDIRECTSOUNDCAPTURE8 = *mut Option; pub type LPLPDIRECTSOUNDCAPTUREBUFFER = *mut Option; pub type LPLPDIRECTSOUNDCAPTUREBUFFER8 = *mut Option; pub type LPLPDIRECTSOUNDNOTIFY = *mut Option; -#[cfg(feature = "mediaobj")] -pub type LPREFERENCE_TIME = *mut super::mediaobj::REFERENCE_TIME; +#[cfg(feature = "ksmedia")] +pub type LPREFERENCE_TIME = *mut super::ksmedia::REFERENCE_TIME; diff --git a/crates/libs/windows/src/Windows/dxva2api/mod.rs b/crates/libs/windows/src/Windows/dxva2api/mod.rs index 3d738a79b2..53406d7a8a 100644 --- a/crates/libs/windows/src/Windows/dxva2api/mod.rs +++ b/crates/libs/windows/src/Windows/dxva2api/mod.rs @@ -376,10 +376,10 @@ pub const DXVA2_VideoProcBobDevice: windows_core::GUID = windows_core::GUID::fro pub const DXVA2_VideoProcProgressiveDevice: windows_core::GUID = windows_core::GUID::from_u128(0x5a54a0c9_c7ec_4bd9_8ede_f3c75dc4393b); pub const DXVA2_VideoProcSoftwareDevice: windows_core::GUID = windows_core::GUID::from_u128(0x4553d47f_ee7e_4e3f_9475_dbf1376c4810); #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ksmedia", feature = "windef"))] #[derive(Clone, Copy)] pub struct DXVA2_VideoProcessBltParams { - pub TargetFrame: super::mediaobj::REFERENCE_TIME, + pub TargetFrame: super::ksmedia::REFERENCE_TIME, pub TargetRect: super::windef::RECT, pub ConstrictionSize: super::windef::SIZE, pub StreamingFlags: u32, @@ -393,7 +393,7 @@ pub struct DXVA2_VideoProcessBltParams { pub DetailFilterChroma: DXVA2_FilterValues, pub DestData: u32, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ksmedia", feature = "windef"))] impl Default for DXVA2_VideoProcessBltParams { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -434,10 +434,10 @@ pub struct DXVA2_VideoProcessorCaps { } pub const DXVA2_VideoProcessorRenderTarget: i32 = 1; #[repr(C)] -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef"))] pub struct DXVA2_VideoSample { - pub Start: super::mediaobj::REFERENCE_TIME, - pub End: super::mediaobj::REFERENCE_TIME, + pub Start: super::ksmedia::REFERENCE_TIME, + pub End: super::ksmedia::REFERENCE_TIME, pub SampleFormat: DXVA2_ExtendedFormat, pub SrcSurface: core::mem::ManuallyDrop>, pub SrcRect: super::windef::RECT, @@ -446,13 +446,13 @@ pub struct DXVA2_VideoSample { pub PlanarAlpha: DXVA2_Fixed32, pub SampleData: u32, } -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef"))] impl Clone for DXVA2_VideoSample { fn clone(&self) -> Self { unsafe { core::mem::transmute_copy(self) } } } -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef"))] impl Default for DXVA2_VideoSample { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -987,7 +987,7 @@ impl IDirectXVideoProcessor { (windows_core::Interface::vtable(self).GetFilterPropertyRange)(windows_core::Interface::as_raw(self), filtersetting, &mut result__).map(|| result__) } } - #[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef", feature = "winnt"))] + #[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef", feature = "winnt"))] pub unsafe fn VideoProcessBlt(&self, prendertarget: P0, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: &[DXVA2_VideoSample], phandlecomplete: Option<*mut super::winnt::HANDLE>) -> windows_core::HRESULT where P0: windows_core::Param, @@ -1010,12 +1010,12 @@ pub struct IDirectXVideoProcessor_Vtbl { GetVideoProcessorCaps: usize, pub GetProcAmpRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT, pub GetFilterPropertyRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT, - #[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef", feature = "winnt"))] + #[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef", feature = "winnt"))] pub VideoProcessBlt: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const DXVA2_VideoProcessBltParams, *const DXVA2_VideoSample, u32, *mut super::winnt::HANDLE) -> windows_core::HRESULT, - #[cfg(not(all(feature = "d3d9", feature = "mediaobj", feature = "windef", feature = "winnt")))] + #[cfg(not(all(feature = "d3d9", feature = "ksmedia", feature = "windef", feature = "winnt")))] VideoProcessBlt: usize, } -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef", feature = "winnt"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef", feature = "winnt"))] pub trait IDirectXVideoProcessor_Impl: windows_core::IUnknownImpl { fn GetVideoProcessorService(&self) -> windows_core::Result; fn GetCreationParameters(&self, pdeviceguid: *mut windows_core::GUID, pvideodesc: *mut DXVA2_VideoDesc, prendertargetformat: *mut super::d3d9::D3DFORMAT, pmaxnumsubstreams: *mut u32) -> windows_core::Result<()>; @@ -1024,7 +1024,7 @@ pub trait IDirectXVideoProcessor_Impl: windows_core::IUnknownImpl { fn GetFilterPropertyRange(&self, filtersetting: u32) -> windows_core::Result; fn VideoProcessBlt(&self, prendertarget: windows_core::Ref, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: *const DXVA2_VideoSample, numsamples: u32, phandlecomplete: *mut super::winnt::HANDLE) -> windows_core::Result<()>; } -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef", feature = "winnt"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef", feature = "winnt"))] impl IDirectXVideoProcessor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetVideoProcessorService(this: *mut core::ffi::c_void, ppservice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -1095,7 +1095,7 @@ impl IDirectXVideoProcessor_Vtbl { iid == &::IID } } -#[cfg(all(feature = "d3d9", feature = "mediaobj", feature = "windef", feature = "winnt"))] +#[cfg(all(feature = "d3d9", feature = "ksmedia", feature = "windef", feature = "winnt"))] impl windows_core::RuntimeName for IDirectXVideoProcessor {} windows_core::imp::define_interface!(IDirectXVideoProcessorService, IDirectXVideoProcessorService_Vtbl, 0xfc51a552_d5e7_11d9_af55_00054e43ff02); impl core::ops::Deref for IDirectXVideoProcessorService { diff --git a/crates/libs/windows/src/Windows/endpointvolume/mod.rs b/crates/libs/windows/src/Windows/endpointvolume/mod.rs new file mode 100644 index 0000000000..74c84a88f4 --- /dev/null +++ b/crates/libs/windows/src/Windows/endpointvolume/mod.rs @@ -0,0 +1,499 @@ +#[repr(C)] +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct AUDIO_VOLUME_NOTIFICATION_DATA { + pub guidEventContext: windows_core::GUID, + pub bMuted: windows_core::BOOL, + pub fMasterVolume: f32, + pub nChannels: u32, + pub afChannelVolumes: [f32; 1], +} +impl Default for AUDIO_VOLUME_NOTIFICATION_DATA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const ENDPOINT_HARDWARE_SUPPORT_METER: u32 = 4; +pub const ENDPOINT_HARDWARE_SUPPORT_MUTE: u32 = 2; +pub const ENDPOINT_HARDWARE_SUPPORT_VOLUME: u32 = 1; +windows_core::imp::define_interface!(IAudioEndpointVolume, IAudioEndpointVolume_Vtbl, 0x5cdf2c82_841e_4546_9722_0cf74078229a); +windows_core::imp::interface_hierarchy!(IAudioEndpointVolume, windows_core::IUnknown); +impl IAudioEndpointVolume { + pub unsafe fn RegisterControlChangeNotify(&self, pnotify: P0) -> windows_core::HRESULT + where + P0: windows_core::Param, + { + unsafe { (windows_core::Interface::vtable(self).RegisterControlChangeNotify)(windows_core::Interface::as_raw(self), pnotify.param().abi()) } + } + pub unsafe fn UnregisterControlChangeNotify(&self, pnotify: P0) -> windows_core::HRESULT + where + P0: windows_core::Param, + { + unsafe { (windows_core::Interface::vtable(self).UnregisterControlChangeNotify)(windows_core::Interface::as_raw(self), pnotify.param().abi()) } + } + pub unsafe fn GetChannelCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn SetMasterVolumeLevel(&self, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetMasterVolumeLevel)(windows_core::Interface::as_raw(self), fleveldb, pguideventcontext) } + } + pub unsafe fn SetMasterVolumeLevelScalar(&self, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetMasterVolumeLevelScalar)(windows_core::Interface::as_raw(self), flevel, pguideventcontext) } + } + pub unsafe fn GetMasterVolumeLevel(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetMasterVolumeLevel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetMasterVolumeLevelScalar(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetMasterVolumeLevelScalar)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn SetChannelVolumeLevel(&self, nchannel: u32, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetChannelVolumeLevel)(windows_core::Interface::as_raw(self), nchannel, fleveldb, pguideventcontext) } + } + pub unsafe fn SetChannelVolumeLevelScalar(&self, nchannel: u32, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetChannelVolumeLevelScalar)(windows_core::Interface::as_raw(self), nchannel, flevel, pguideventcontext) } + } + pub unsafe fn GetChannelVolumeLevel(&self, nchannel: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelVolumeLevel)(windows_core::Interface::as_raw(self), nchannel, &mut result__).map(|| result__) + } + } + pub unsafe fn GetChannelVolumeLevelScalar(&self, nchannel: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelVolumeLevelScalar)(windows_core::Interface::as_raw(self), nchannel, &mut result__).map(|| result__) + } + } + pub unsafe fn SetMute(&self, bmute: bool, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.into(), pguideventcontext) } + } + pub unsafe fn GetMute(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetMute)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetVolumeStepInfo(&self, pnstep: *mut u32, pnstepcount: *mut u32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetVolumeStepInfo)(windows_core::Interface::as_raw(self), pnstep as _, pnstepcount as _) } + } + pub unsafe fn VolumeStepUp(&self, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).VolumeStepUp)(windows_core::Interface::as_raw(self), pguideventcontext) } + } + pub unsafe fn VolumeStepDown(&self, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).VolumeStepDown)(windows_core::Interface::as_raw(self), pguideventcontext) } + } + pub unsafe fn QueryHardwareSupport(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).QueryHardwareSupport)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetVolumeRange(&self, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetVolumeRange)(windows_core::Interface::as_raw(self), pflvolumemindb as _, pflvolumemaxdb as _, pflvolumeincrementdb as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioEndpointVolume_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub RegisterControlChangeNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, + pub UnregisterControlChangeNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, + pub GetChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub SetMasterVolumeLevel: unsafe extern "system" fn(*mut core::ffi::c_void, f32, *const windows_core::GUID) -> windows_core::HRESULT, + pub SetMasterVolumeLevelScalar: unsafe extern "system" fn(*mut core::ffi::c_void, f32, *const windows_core::GUID) -> windows_core::HRESULT, + pub GetMasterVolumeLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT, + pub GetMasterVolumeLevelScalar: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT, + pub SetChannelVolumeLevel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, f32, *const windows_core::GUID) -> windows_core::HRESULT, + pub SetChannelVolumeLevelScalar: unsafe extern "system" fn(*mut core::ffi::c_void, u32, f32, *const windows_core::GUID) -> windows_core::HRESULT, + pub GetChannelVolumeLevel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT, + pub GetChannelVolumeLevelScalar: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT, + pub SetMute: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, *const windows_core::GUID) -> windows_core::HRESULT, + pub GetMute: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT, + pub GetVolumeStepInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT, + pub VolumeStepUp: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, + pub VolumeStepDown: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, + pub QueryHardwareSupport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetVolumeRange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32, *mut f32, *mut f32) -> windows_core::HRESULT, +} +pub trait IAudioEndpointVolume_Impl: windows_core::IUnknownImpl { + fn RegisterControlChangeNotify(&self, pnotify: windows_core::Ref) -> windows_core::Result<()>; + fn UnregisterControlChangeNotify(&self, pnotify: windows_core::Ref) -> windows_core::Result<()>; + fn GetChannelCount(&self) -> windows_core::Result; + fn SetMasterVolumeLevel(&self, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetMasterVolumeLevelScalar(&self, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn GetMasterVolumeLevel(&self) -> windows_core::Result; + fn GetMasterVolumeLevelScalar(&self) -> windows_core::Result; + fn SetChannelVolumeLevel(&self, nchannel: u32, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetChannelVolumeLevelScalar(&self, nchannel: u32, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn GetChannelVolumeLevel(&self, nchannel: u32) -> windows_core::Result; + fn GetChannelVolumeLevelScalar(&self, nchannel: u32) -> windows_core::Result; + fn SetMute(&self, bmute: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn GetMute(&self) -> windows_core::Result; + fn GetVolumeStepInfo(&self, pnstep: *mut u32, pnstepcount: *mut u32) -> windows_core::Result<()>; + fn VolumeStepUp(&self, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn VolumeStepDown(&self, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; + fn QueryHardwareSupport(&self) -> windows_core::Result; + fn GetVolumeRange(&self, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::Result<()>; +} +impl IAudioEndpointVolume_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn RegisterControlChangeNotify(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::RegisterControlChangeNotify(this, core::mem::transmute_copy(&pnotify)).into() + } + } + unsafe extern "system" fn UnregisterControlChangeNotify(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::UnregisterControlChangeNotify(this, core::mem::transmute_copy(&pnotify)).into() + } + } + unsafe extern "system" fn GetChannelCount(this: *mut core::ffi::c_void, pnchannelcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::GetChannelCount(this) { + Ok(ok__) => { + pnchannelcount.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetMasterVolumeLevel(this: *mut core::ffi::c_void, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::SetMasterVolumeLevel(this, core::mem::transmute_copy(&fleveldb), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn SetMasterVolumeLevelScalar(this: *mut core::ffi::c_void, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::SetMasterVolumeLevelScalar(this, core::mem::transmute_copy(&flevel), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn GetMasterVolumeLevel(this: *mut core::ffi::c_void, pfleveldb: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::GetMasterVolumeLevel(this) { + Ok(ok__) => { + pfleveldb.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetMasterVolumeLevelScalar(this: *mut core::ffi::c_void, pflevel: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::GetMasterVolumeLevelScalar(this) { + Ok(ok__) => { + pflevel.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetChannelVolumeLevel(this: *mut core::ffi::c_void, nchannel: u32, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::SetChannelVolumeLevel(this, core::mem::transmute_copy(&nchannel), core::mem::transmute_copy(&fleveldb), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn SetChannelVolumeLevelScalar(this: *mut core::ffi::c_void, nchannel: u32, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::SetChannelVolumeLevelScalar(this, core::mem::transmute_copy(&nchannel), core::mem::transmute_copy(&flevel), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn GetChannelVolumeLevel(this: *mut core::ffi::c_void, nchannel: u32, pfleveldb: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::GetChannelVolumeLevel(this, core::mem::transmute_copy(&nchannel)) { + Ok(ok__) => { + pfleveldb.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetChannelVolumeLevelScalar(this: *mut core::ffi::c_void, nchannel: u32, pflevel: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::GetChannelVolumeLevelScalar(this, core::mem::transmute_copy(&nchannel)) { + Ok(ok__) => { + pflevel.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn SetMute(this: *mut core::ffi::c_void, bmute: windows_core::BOOL, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::SetMute(this, core::mem::transmute_copy(&bmute), core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn GetMute(this: *mut core::ffi::c_void, pbmute: *mut windows_core::BOOL) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::GetMute(this) { + Ok(ok__) => { + pbmute.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetVolumeStepInfo(this: *mut core::ffi::c_void, pnstep: *mut u32, pnstepcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::GetVolumeStepInfo(this, core::mem::transmute_copy(&pnstep), core::mem::transmute_copy(&pnstepcount)).into() + } + } + unsafe extern "system" fn VolumeStepUp(this: *mut core::ffi::c_void, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::VolumeStepUp(this, core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn VolumeStepDown(this: *mut core::ffi::c_void, pguideventcontext: *const windows_core::GUID) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::VolumeStepDown(this, core::mem::transmute_copy(&pguideventcontext)).into() + } + } + unsafe extern "system" fn QueryHardwareSupport(this: *mut core::ffi::c_void, pdwhardwaresupportmask: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioEndpointVolume_Impl::QueryHardwareSupport(this) { + Ok(ok__) => { + pdwhardwaresupportmask.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetVolumeRange(this: *mut core::ffi::c_void, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolume_Impl::GetVolumeRange(this, core::mem::transmute_copy(&pflvolumemindb), core::mem::transmute_copy(&pflvolumemaxdb), core::mem::transmute_copy(&pflvolumeincrementdb)).into() + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + RegisterControlChangeNotify: RegisterControlChangeNotify::, + UnregisterControlChangeNotify: UnregisterControlChangeNotify::, + GetChannelCount: GetChannelCount::, + SetMasterVolumeLevel: SetMasterVolumeLevel::, + SetMasterVolumeLevelScalar: SetMasterVolumeLevelScalar::, + GetMasterVolumeLevel: GetMasterVolumeLevel::, + GetMasterVolumeLevelScalar: GetMasterVolumeLevelScalar::, + SetChannelVolumeLevel: SetChannelVolumeLevel::, + SetChannelVolumeLevelScalar: SetChannelVolumeLevelScalar::, + GetChannelVolumeLevel: GetChannelVolumeLevel::, + GetChannelVolumeLevelScalar: GetChannelVolumeLevelScalar::, + SetMute: SetMute::, + GetMute: GetMute::, + GetVolumeStepInfo: GetVolumeStepInfo::, + VolumeStepUp: VolumeStepUp::, + VolumeStepDown: VolumeStepDown::, + QueryHardwareSupport: QueryHardwareSupport::, + GetVolumeRange: GetVolumeRange::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioEndpointVolume {} +windows_core::imp::define_interface!(IAudioEndpointVolumeCallback, IAudioEndpointVolumeCallback_Vtbl, 0x657804fa_d6ad_4496_8a60_352752af4f89); +windows_core::imp::interface_hierarchy!(IAudioEndpointVolumeCallback, windows_core::IUnknown); +impl IAudioEndpointVolumeCallback { + pub unsafe fn OnNotify(&self, pnotify: *mut AUDIO_VOLUME_NOTIFICATION_DATA) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), pnotify as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioEndpointVolumeCallback_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub OnNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut AUDIO_VOLUME_NOTIFICATION_DATA) -> windows_core::HRESULT, +} +pub trait IAudioEndpointVolumeCallback_Impl: windows_core::IUnknownImpl { + fn OnNotify(&self, pnotify: *mut AUDIO_VOLUME_NOTIFICATION_DATA) -> windows_core::Result<()>; +} +impl IAudioEndpointVolumeCallback_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn OnNotify(this: *mut core::ffi::c_void, pnotify: *mut AUDIO_VOLUME_NOTIFICATION_DATA) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolumeCallback_Impl::OnNotify(this, core::mem::transmute_copy(&pnotify)).into() + } + } + Self { base__: windows_core::IUnknown_Vtbl::new::(), OnNotify: OnNotify:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioEndpointVolumeCallback {} +windows_core::imp::define_interface!(IAudioEndpointVolumeEx, IAudioEndpointVolumeEx_Vtbl, 0x66e11784_f695_4f28_a505_a7080081a78f); +impl core::ops::Deref for IAudioEndpointVolumeEx { + type Target = IAudioEndpointVolume; + fn deref(&self) -> &Self::Target { + unsafe { core::mem::transmute(self) } + } +} +windows_core::imp::interface_hierarchy!(IAudioEndpointVolumeEx, windows_core::IUnknown, IAudioEndpointVolume); +impl IAudioEndpointVolumeEx { + pub unsafe fn GetVolumeRangeChannel(&self, ichannel: u32, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::HRESULT { + unsafe { (windows_core::Interface::vtable(self).GetVolumeRangeChannel)(windows_core::Interface::as_raw(self), ichannel, pflvolumemindb as _, pflvolumemaxdb as _, pflvolumeincrementdb as _) } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioEndpointVolumeEx_Vtbl { + pub base__: IAudioEndpointVolume_Vtbl, + pub GetVolumeRangeChannel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32, *mut f32, *mut f32) -> windows_core::HRESULT, +} +pub trait IAudioEndpointVolumeEx_Impl: IAudioEndpointVolume_Impl { + fn GetVolumeRangeChannel(&self, ichannel: u32, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::Result<()>; +} +impl IAudioEndpointVolumeEx_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetVolumeRangeChannel(this: *mut core::ffi::c_void, ichannel: u32, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IAudioEndpointVolumeEx_Impl::GetVolumeRangeChannel(this, core::mem::transmute_copy(&ichannel), core::mem::transmute_copy(&pflvolumemindb), core::mem::transmute_copy(&pflvolumemaxdb), core::mem::transmute_copy(&pflvolumeincrementdb)).into() + } + } + Self { base__: IAudioEndpointVolume_Vtbl::new::(), GetVolumeRangeChannel: GetVolumeRangeChannel:: } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID || iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioEndpointVolumeEx {} +windows_core::imp::define_interface!(IAudioMeterInformation, IAudioMeterInformation_Vtbl, 0xc02216f6_8c67_4b5b_9d00_d008e73e0064); +windows_core::imp::interface_hierarchy!(IAudioMeterInformation, windows_core::IUnknown); +impl IAudioMeterInformation { + pub unsafe fn GetPeakValue(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetPeakValue)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetMeteringChannelCount(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetMeteringChannelCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } + pub unsafe fn GetChannelsPeakValues(&self, u32channelcount: u32) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetChannelsPeakValues)(windows_core::Interface::as_raw(self), u32channelcount, &mut result__).map(|| result__) + } + } + pub unsafe fn QueryHardwareSupport(&self) -> windows_core::Result { + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).QueryHardwareSupport)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) + } + } +} +#[repr(C)] +#[doc(hidden)] +pub struct IAudioMeterInformation_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetPeakValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT, + pub GetMeteringChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, + pub GetChannelsPeakValues: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT, + pub QueryHardwareSupport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, +} +pub trait IAudioMeterInformation_Impl: windows_core::IUnknownImpl { + fn GetPeakValue(&self) -> windows_core::Result; + fn GetMeteringChannelCount(&self) -> windows_core::Result; + fn GetChannelsPeakValues(&self, u32channelcount: u32) -> windows_core::Result; + fn QueryHardwareSupport(&self) -> windows_core::Result; +} +impl IAudioMeterInformation_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetPeakValue(this: *mut core::ffi::c_void, pfpeak: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioMeterInformation_Impl::GetPeakValue(this) { + Ok(ok__) => { + pfpeak.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetMeteringChannelCount(this: *mut core::ffi::c_void, pnchannelcount: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioMeterInformation_Impl::GetMeteringChannelCount(this) { + Ok(ok__) => { + pnchannelcount.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn GetChannelsPeakValues(this: *mut core::ffi::c_void, u32channelcount: u32, afpeakvalues: *mut f32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioMeterInformation_Impl::GetChannelsPeakValues(this, core::mem::transmute_copy(&u32channelcount)) { + Ok(ok__) => { + afpeakvalues.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + unsafe extern "system" fn QueryHardwareSupport(this: *mut core::ffi::c_void, pdwhardwaresupportmask: *mut u32) -> windows_core::HRESULT { + unsafe { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IAudioMeterInformation_Impl::QueryHardwareSupport(this) { + Ok(ok__) => { + pdwhardwaresupportmask.write(ok__); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetPeakValue: GetPeakValue::, + GetMeteringChannelCount: GetMeteringChannelCount::, + GetChannelsPeakValues: GetChannelsPeakValues::, + QueryHardwareSupport: QueryHardwareSupport::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IAudioMeterInformation {} +pub type PAUDIO_VOLUME_NOTIFICATION_DATA = *mut AUDIO_VOLUME_NOTIFICATION_DATA; diff --git a/crates/libs/windows/src/Windows/ksmedia/mod.rs b/crates/libs/windows/src/Windows/ksmedia/mod.rs index 9061de6b7c..2acd88e8eb 100644 --- a/crates/libs/windows/src/Windows/ksmedia/mod.rs +++ b/crates/libs/windows/src/Windows/ksmedia/mod.rs @@ -1873,6 +1873,9 @@ pub struct KSDATAFORMAT_SUBTYPE_NABTS_FEC(pub u8); pub struct KSDATAFORMAT_SUBTYPE_OVERLAY(pub u8); #[repr(C)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +pub struct KSDATAFORMAT_SUBTYPE_PCM(pub u8); +#[repr(C)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KSDATAFORMAT_SUBTYPE_RAW8(pub u8); #[repr(C)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1918,6 +1921,9 @@ pub struct KSDATAFORMAT_SUBTYPE_VPVBI(pub u8); pub struct KSDATAFORMAT_SUBTYPE_VPVideo(pub u8); #[repr(C)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +pub struct KSDATAFORMAT_SUBTYPE_WAVEFORMATEX(pub u8); +#[repr(C)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KSDATAFORMAT_SUBTYPE_WMAUDIO2(pub u8); #[repr(C)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1993,13 +1999,13 @@ impl Default for KSDATAFORMAT_WAVEFORMATEX { } } #[repr(C, packed(1))] -#[cfg(all(feature = "ks", feature = "mmeapi", feature = "mmreg"))] +#[cfg(all(feature = "ks", feature = "mmeapi"))] #[derive(Clone, Copy)] pub struct KSDATAFORMAT_WAVEFORMATEXTENSIBLE { pub DataFormat: super::ks::KSDATAFORMAT, - pub WaveFormatExt: super::mmreg::WAVEFORMATEXTENSIBLE, + pub WaveFormatExt: WAVEFORMATEXTENSIBLE, } -#[cfg(all(feature = "ks", feature = "mmeapi", feature = "mmreg"))] +#[cfg(all(feature = "ks", feature = "mmeapi"))] impl Default for KSDATAFORMAT_WAVEFORMATEXTENSIBLE { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5003,10 +5009,9 @@ pub const KS_AMVP_MODE_SKIPODD: KS_AMVP_MODE = 4; pub const KS_AMVP_MODE_WEAVE: KS_AMVP_MODE = 0; pub type KS_AMVP_SELECTFORMATBY = i32; #[repr(C)] -#[cfg(feature = "mediaobj")] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KS_AM_ExactRateChange { - pub OutputZeroTime: super::mediaobj::REFERENCE_TIME, + pub OutputZeroTime: REFERENCE_TIME, pub Rate: i32, } #[repr(transparent)] @@ -5018,10 +5023,9 @@ pub const KS_AM_RATE_MaxFullDataRate: KS_AM_PROPERTY_TS_RATE_CHANGE = 3; pub const KS_AM_RATE_SimpleRateChange: KS_AM_PROPERTY_TS_RATE_CHANGE = 1; pub const KS_AM_RATE_Step: KS_AM_PROPERTY_TS_RATE_CHANGE = 4; #[repr(C)] -#[cfg(feature = "mediaobj")] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KS_AM_SimpleRateChange { - pub StartTime: super::mediaobj::REFERENCE_TIME, + pub StartTime: REFERENCE_TIME, pub Rate: i32, } #[repr(transparent)] @@ -5029,14 +5033,14 @@ pub struct KS_AM_SimpleRateChange { pub struct KS_AM_Step(pub u32); pub const KS_AM_UseNewCSSKey: u32 = 1; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KS_ANALOGVIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwActiveWidth: u32, pub dwActiveHeight: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, } pub type KS_AnalogVideoStandard = i32; pub const KS_AnalogVideo_NTSC_433: KS_AnalogVideoStandard = 4; @@ -5154,13 +5158,13 @@ impl Default for KS_DATAFORMAT_IMAGEINFO { } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_MPEGVIDEOINFO2 { pub DataFormat: super::ks::KSDATAFORMAT, pub MpegVideoInfoHeader2: KS_MPEGVIDEOINFO2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_MPEGVIDEOINFO2 { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5180,52 +5184,52 @@ impl Default for KS_DATAFORMAT_VBIINFOHEADER { } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_VIDEOINFOHEADER { pub DataFormat: super::ks::KSDATAFORMAT, pub VideoInfoHeader: KS_VIDEOINFOHEADER, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_VIDEOINFOHEADER { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_VIDEOINFOHEADER2 { pub DataFormat: super::ks::KSDATAFORMAT, pub VideoInfoHeader2: KS_VIDEOINFOHEADER2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_VIDEOINFOHEADER2 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATAFORMAT_VIDEOINFO_PALETTE { pub DataFormat: super::ks::KSDATAFORMAT, pub VideoInfo: KS_VIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATAFORMAT_VIDEOINFO_PALETTE { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_ANALOGVIDEO { pub DataRange: super::ks::KSDATARANGE, pub AnalogVideoInfo: KS_ANALOGVIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_ANALOGVIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5264,7 +5268,7 @@ impl Default for KS_DATARANGE_IMAGE { } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_MPEG1_VIDEO { pub DataRange: super::ks::KSDATARANGE, @@ -5275,14 +5279,14 @@ pub struct KS_DATARANGE_MPEG1_VIDEO { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_MPEG1VIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_MPEG1_VIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_MPEG2_VIDEO { pub DataRange: super::ks::KSDATARANGE, @@ -5293,14 +5297,14 @@ pub struct KS_DATARANGE_MPEG2_VIDEO { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_MPEGVIDEOINFO2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_MPEG2_VIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_VIDEO { pub DataRange: super::ks::KSDATARANGE, @@ -5311,14 +5315,14 @@ pub struct KS_DATARANGE_VIDEO { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_VIDEOINFOHEADER, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_VIDEO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_VIDEO2 { pub DataRange: super::ks::KSDATARANGE, @@ -5329,14 +5333,14 @@ pub struct KS_DATARANGE_VIDEO2 { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfoHeader: KS_VIDEOINFOHEADER2, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_VIDEO2 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] #[derive(Clone, Copy)] pub struct KS_DATARANGE_VIDEO_PALETTE { pub DataRange: super::ks::KSDATARANGE, @@ -5347,7 +5351,7 @@ pub struct KS_DATARANGE_VIDEO_PALETTE { pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS, pub VideoInfo: KS_VIDEOINFO, } -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] impl Default for KS_DATARANGE_VIDEO_PALETTE { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5581,7 +5585,7 @@ pub const KS_MACROVISION_LEVEL2: KS_COPY_MACROVISION_LEVEL = 2; pub const KS_MACROVISION_LEVEL3: KS_COPY_MACROVISION_LEVEL = 3; pub const KS_MAX_SIZE_MPEG1_SEQUENCE_INFO: u32 = 140; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct KS_MPEG1VIDEOINFO { pub hdr: KS_VIDEOINFOHEADER, @@ -5589,7 +5593,7 @@ pub struct KS_MPEG1VIDEOINFO { pub cbSequenceHeader: u32, pub bSequenceHeader: [u8; 1], } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_MPEG1VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5626,7 +5630,7 @@ pub struct KS_MPEGAUDIOINFO { } pub const KS_MPEGAUDIOINFO_27MhzTimebase: u32 = 1; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_MPEGVIDEOINFO2 { pub hdr: KS_VIDEOINFOHEADER2, @@ -5637,7 +5641,7 @@ pub struct KS_MPEGVIDEOINFO2 { pub dwFlags: u32, pub bSequenceHeader: [u32; 1], } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_MPEGVIDEOINFO2 { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -5788,57 +5792,57 @@ pub const KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT: KS_VIDEODECODER_FLAGS = 1; pub const KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED: KS_VIDEODECODER_FLAGS = 4; pub const KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING: KS_VIDEODECODER_FLAGS = 2; #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_VIDEOINFO { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, pub bmiHeader: KS_BITMAPINFOHEADER, pub Anonymous: KS_VIDEOINFO_0, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFO { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub union KS_VIDEOINFO_0 { pub bmiColors: [KS_RGBQUAD; 256], pub dwBitMasks: [u32; 3], pub TrueColorInfo: KS_TRUECOLORINFO, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFO_0 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KS_VIDEOINFOHEADER { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, pub bmiHeader: KS_BITMAPINFOHEADER, } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub struct KS_VIDEOINFOHEADER2 { pub rcSource: super::windef::RECT, pub rcTarget: super::windef::RECT, pub dwBitRate: u32, pub dwBitErrorRate: u32, - pub AvgTimePerFrame: super::mediaobj::REFERENCE_TIME, + pub AvgTimePerFrame: REFERENCE_TIME, pub dwInterlaceFlags: u32, pub dwCopyProtectFlags: u32, pub dwPictAspectRatioX: u32, @@ -5847,20 +5851,20 @@ pub struct KS_VIDEOINFOHEADER2 { pub dwReserved2: u32, pub bmiHeader: KS_BITMAPINFOHEADER, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFOHEADER2 { fn default() -> Self { unsafe { core::mem::zeroed() } } } #[repr(C)] -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] #[derive(Clone, Copy)] pub union KS_VIDEOINFOHEADER2_0 { pub dwControlFlags: u32, pub dwReserved1: u32, } -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] impl Default for KS_VIDEOINFOHEADER2_0 { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -6155,7 +6159,7 @@ pub type PKSCAMERA_PROFILE_PININFO = *mut KSCAMERA_PROFILE_PININFO; pub type PKSDATAFORMAT_DSOUND = *mut KSDATAFORMAT_DSOUND; #[cfg(all(feature = "ks", feature = "mmeapi"))] pub type PKSDATAFORMAT_WAVEFORMATEX = *mut KSDATAFORMAT_WAVEFORMATEX; -#[cfg(all(feature = "ks", feature = "mmeapi", feature = "mmreg"))] +#[cfg(all(feature = "ks", feature = "mmeapi"))] pub type PKSDATAFORMAT_WAVEFORMATEXTENSIBLE = *mut KSDATAFORMAT_WAVEFORMATEXTENSIBLE; #[cfg(feature = "ks")] pub type PKSDATARANGE_AUDIO = *mut KSDATARANGE_AUDIO; @@ -6399,11 +6403,9 @@ pub type PKS_AMVPDATAINFO = *mut KS_AMVPDATAINFO; #[cfg(feature = "windef")] pub type PKS_AMVPDIMINFO = *mut KS_AMVPDIMINFO; pub type PKS_AMVPSIZE = *mut KS_AMVPSIZE; -#[cfg(feature = "mediaobj")] pub type PKS_AM_ExactRateChange = *mut KS_AM_ExactRateChange; -#[cfg(feature = "mediaobj")] pub type PKS_AM_SimpleRateChange = *mut KS_AM_SimpleRateChange; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_ANALOGVIDEOINFO = *mut KS_ANALOGVIDEOINFO; pub type PKS_BITMAPINFOHEADER = *mut KS_BITMAPINFOHEADER; pub type PKS_COLCON = *mut KS_COLCON; @@ -6413,31 +6415,31 @@ pub type PKS_COPY_MACROVISION_LEVEL = *mut KS_COPY_MACROVISION_LEVEL; pub type PKS_DATAFORMAT_H264VIDEOINFO = *mut KS_DATAFORMAT_H264VIDEOINFO; #[cfg(feature = "ks")] pub type PKS_DATAFORMAT_IMAGEINFO = *mut KS_DATAFORMAT_IMAGEINFO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_MPEGVIDEOINFO2 = *mut KS_DATAFORMAT_MPEGVIDEOINFO2; #[cfg(feature = "ks")] pub type PKS_DATAFORMAT_VBIINFOHEADER = *mut KS_DATAFORMAT_VBIINFOHEADER; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_VIDEOINFOHEADER = *mut KS_DATAFORMAT_VIDEOINFOHEADER; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_VIDEOINFOHEADER2 = *mut KS_DATAFORMAT_VIDEOINFOHEADER2; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATAFORMAT_VIDEOINFO_PALETTE = *mut KS_DATAFORMAT_VIDEOINFO_PALETTE; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_ANALOGVIDEO = *mut KS_DATARANGE_ANALOGVIDEO; #[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_H264_VIDEO = *mut KS_DATARANGE_H264_VIDEO; #[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_IMAGE = *mut KS_DATARANGE_IMAGE; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_MPEG1_VIDEO = *mut KS_DATARANGE_MPEG1_VIDEO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_MPEG2_VIDEO = *mut KS_DATARANGE_MPEG2_VIDEO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO = *mut KS_DATARANGE_VIDEO; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO2 = *mut KS_DATARANGE_VIDEO2; -#[cfg(all(feature = "ks", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO_PALETTE = *mut KS_DATARANGE_VIDEO_PALETTE; #[cfg(all(feature = "ks", feature = "windef"))] pub type PKS_DATARANGE_VIDEO_VBI = *mut KS_DATARANGE_VIDEO_VBI; @@ -6452,21 +6454,21 @@ pub type PKS_DVD_YUV = *mut KS_DVD_YUV; #[cfg(all(feature = "windef", feature = "winnt"))] pub type PKS_FRAME_INFO = *mut KS_FRAME_INFO; pub type PKS_H264VIDEOINFO = *mut KS_H264VIDEOINFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_MPEG1VIDEOINFO = *mut KS_MPEG1VIDEOINFO; pub type PKS_MPEGAUDIOINFO = *mut KS_MPEGAUDIOINFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_MPEGVIDEOINFO2 = *mut KS_MPEGVIDEOINFO2; pub type PKS_RGBQUAD = *mut KS_RGBQUAD; pub type PKS_TRUECOLORINFO = *mut KS_TRUECOLORINFO; pub type PKS_TVTUNER_CHANGE_INFO = *mut KS_TVTUNER_CHANGE_INFO; pub type PKS_VBIINFOHEADER = *mut KS_VBIINFOHEADER; pub type PKS_VBI_FRAME_INFO = *mut KS_VBI_FRAME_INFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_VIDEOINFO = *mut KS_VIDEOINFO; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_VIDEOINFOHEADER = *mut KS_VIDEOINFOHEADER; -#[cfg(all(feature = "mediaobj", feature = "windef"))] +#[cfg(feature = "windef")] pub type PKS_VIDEOINFOHEADER2 = *mut KS_VIDEOINFOHEADER2; #[cfg(feature = "windef")] pub type PKS_VIDEO_STREAM_CONFIG_CAPS = *mut KS_VIDEO_STREAM_CONFIG_CAPS; @@ -6564,11 +6566,16 @@ pub type PVIDEOFORMAT_DX12 = *mut VIDEOFORMAT_DX12; pub type PVRAM_SURFACE_INFO = *mut VRAM_SURFACE_INFO; #[cfg(feature = "ks")] pub type PVRAM_SURFACE_INFO_PROPERTY_S = *mut VRAM_SURFACE_INFO_PROPERTY_S; -#[cfg(all(feature = "mmeapi", feature = "mmreg"))] +#[cfg(feature = "mmeapi")] +pub type PWAVEFORMATEXTENSIBLE = *mut WAVEFORMATEXTENSIBLE; +#[cfg(feature = "mmeapi")] pub type PWAVEFORMATEXTENSIBLE_IEC61937 = *mut WAVEFORMATEXTENSIBLE_IEC61937; pub type PWNF_KSCAMERA_STREAMSTATE_INFO = *mut WNF_KSCAMERA_STREAMSTATE_INFO; pub type PWST_BUFFER = *mut WST_BUFFER; pub type PWST_BUFFER_LINE = *mut WST_BUFFER_LINE; +#[repr(transparent)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] +pub struct REFERENCE_TIME(pub i64); #[repr(C)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct SECURE_BUFFER_INFO { @@ -6589,6 +6596,26 @@ pub struct SOUNDDETECTOR_PATTERNHEADER { pub Size: u32, pub PatternType: windows_core::GUID, } +pub const SPEAKER_ALL: u32 = 2147483648; +pub const SPEAKER_BACK_CENTER: u32 = 256; +pub const SPEAKER_BACK_LEFT: u32 = 16; +pub const SPEAKER_BACK_RIGHT: u32 = 32; +pub const SPEAKER_FRONT_CENTER: u32 = 4; +pub const SPEAKER_FRONT_LEFT: u32 = 1; +pub const SPEAKER_FRONT_LEFT_OF_CENTER: u32 = 64; +pub const SPEAKER_FRONT_RIGHT: u32 = 2; +pub const SPEAKER_FRONT_RIGHT_OF_CENTER: u32 = 128; +pub const SPEAKER_LOW_FREQUENCY: u32 = 8; +pub const SPEAKER_RESERVED: u32 = 2147221504; +pub const SPEAKER_SIDE_LEFT: u32 = 512; +pub const SPEAKER_SIDE_RIGHT: u32 = 1024; +pub const SPEAKER_TOP_BACK_CENTER: u32 = 65536; +pub const SPEAKER_TOP_BACK_LEFT: u32 = 32768; +pub const SPEAKER_TOP_BACK_RIGHT: u32 = 131072; +pub const SPEAKER_TOP_CENTER: u32 = 2048; +pub const SPEAKER_TOP_FRONT_CENTER: u32 = 8192; +pub const SPEAKER_TOP_FRONT_LEFT: u32 = 4096; +pub const SPEAKER_TOP_FRONT_RIGHT: u32 = 16384; pub type TELEPHONY_CALLCONTROLOP = i32; pub const TELEPHONY_CALLCONTROLOP_DISABLE: TELEPHONY_CALLCONTROLOP = 0; pub const TELEPHONY_CALLCONTROLOP_ENABLE: TELEPHONY_CALLCONTROLOP = 1; @@ -6891,20 +6918,50 @@ impl Default for VRAM_SURFACE_INFO_PROPERTY_S { pub const VariableBitRateAverage: VIDEOENCODER_BITRATE_MODE = 1; pub const VariableBitRatePeak: VIDEOENCODER_BITRATE_MODE = 2; #[repr(C, packed(1))] -#[cfg(all(feature = "mmeapi", feature = "mmreg"))] +#[cfg(feature = "mmeapi")] +#[derive(Clone, Copy)] +pub struct WAVEFORMATEXTENSIBLE { + pub Format: super::mmeapi::WAVEFORMATEX, + pub Samples: WAVEFORMATEXTENSIBLE_0, + pub dwChannelMask: u32, + pub SubFormat: windows_core::GUID, +} +#[cfg(feature = "mmeapi")] +impl Default for WAVEFORMATEXTENSIBLE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[cfg(feature = "mmeapi")] +#[derive(Clone, Copy)] +pub union WAVEFORMATEXTENSIBLE_0 { + pub wValidBitsPerSample: u16, + pub wSamplesPerBlock: u16, + pub wReserved: u16, +} +#[cfg(feature = "mmeapi")] +impl Default for WAVEFORMATEXTENSIBLE_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[cfg(feature = "mmeapi")] #[derive(Clone, Copy)] pub struct WAVEFORMATEXTENSIBLE_IEC61937 { - pub FormatExt: super::mmreg::WAVEFORMATEXTENSIBLE, + pub FormatExt: WAVEFORMATEXTENSIBLE, pub dwEncodedSamplesPerSec: u32, pub dwEncodedChannelCount: u32, pub dwAverageBytesPerSec: u32, } -#[cfg(all(feature = "mmeapi", feature = "mmreg"))] +#[cfg(feature = "mmeapi")] impl Default for WAVEFORMATEXTENSIBLE_IEC61937 { fn default() -> Self { unsafe { core::mem::zeroed() } } } +pub const WAVE_FORMAT_EXTENSIBLE: u32 = 65534; #[repr(C)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct WNF_KSCAMERA_STREAMSTATE_INFO { diff --git a/crates/libs/windows/src/Windows/mediaobj/mod.rs b/crates/libs/windows/src/Windows/mediaobj/mod.rs index afad3ad034..29a1350d4c 100644 --- a/crates/libs/windows/src/Windows/mediaobj/mod.rs +++ b/crates/libs/windows/src/Windows/mediaobj/mod.rs @@ -28,12 +28,13 @@ impl Default for DMO_MEDIA_TYPE { } } #[repr(C)] +#[cfg(feature = "ksmedia")] #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct DMO_OUTPUT_DATA_BUFFER { pub pBuffer: core::mem::ManuallyDrop>, pub dwStatus: u32, - pub rtTimestamp: REFERENCE_TIME, - pub rtTimelength: REFERENCE_TIME, + pub rtTimestamp: super::ksmedia::REFERENCE_TIME, + pub rtTimelength: super::ksmedia::REFERENCE_TIME, } pub const DMO_OUTPUT_DATA_BUFFERF_DISCONTINUITY: _DMO_OUTPUT_DATA_BUFFER_FLAGS = 8; pub const DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE: _DMO_OUTPUT_DATA_BUFFER_FLAGS = 16777216; @@ -53,7 +54,8 @@ pub const DMO_VOSF_NEEDS_PREVIOUS_SAMPLE: _DMO_VIDEO_OUTPUT_STREAM_FLAGS = 1; windows_core::imp::define_interface!(IDMOQualityControl, IDMOQualityControl_Vtbl, 0x65abea96_cf36_453f_af8a_705e98f16260); windows_core::imp::interface_hierarchy!(IDMOQualityControl, windows_core::IUnknown); impl IDMOQualityControl { - pub unsafe fn SetNow(&self, rtnow: REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetNow(&self, rtnow: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetNow)(windows_core::Interface::as_raw(self), rtnow) } } pub unsafe fn SetStatus(&self, dwflags: u32) -> windows_core::HRESULT { @@ -70,18 +72,23 @@ impl IDMOQualityControl { #[doc(hidden)] pub struct IDMOQualityControl_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - pub SetNow: unsafe extern "system" fn(*mut core::ffi::c_void, REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub SetNow: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + SetNow: usize, pub SetStatus: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, pub GetStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } +#[cfg(feature = "ksmedia")] pub trait IDMOQualityControl_Impl: windows_core::IUnknownImpl { - fn SetNow(&self, rtnow: REFERENCE_TIME) -> windows_core::Result<()>; + fn SetNow(&self, rtnow: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn SetStatus(&self, dwflags: u32) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; } +#[cfg(feature = "ksmedia")] impl IDMOQualityControl_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn SetNow(this: *mut core::ffi::c_void, rtnow: REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetNow(this: *mut core::ffi::c_void, rtnow: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IDMOQualityControl_Impl::SetNow(this, core::mem::transmute_copy(&rtnow)).into() @@ -116,6 +123,7 @@ impl IDMOQualityControl_Vtbl { iid == &::IID } } +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IDMOQualityControl {} windows_core::imp::define_interface!(IDMOVideoOutputOptimizations, IDMOVideoOutputOptimizations_Vtbl, 0xbe8f4f4e_5b16_4d29_b350_7f6b5d9298ac); windows_core::imp::interface_hierarchy!(IDMOVideoOutputOptimizations, windows_core::IUnknown); @@ -402,13 +410,15 @@ impl IMediaObject { pub unsafe fn GetOutputSizeInfo(&self, dwoutputstreamindex: u32, pcbsize: *mut u32, pcbalignment: *mut u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).GetOutputSizeInfo)(windows_core::Interface::as_raw(self), dwoutputstreamindex, pcbsize as _, pcbalignment as _) } } - pub unsafe fn GetInputMaxLatency(&self, dwinputstreamindex: u32) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetInputMaxLatency(&self, dwinputstreamindex: u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetInputMaxLatency)(windows_core::Interface::as_raw(self), dwinputstreamindex, &mut result__).map(|| result__) } } - pub unsafe fn SetInputMaxLatency(&self, dwinputstreamindex: u32, rtmaxlatency: REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetInputMaxLatency(&self, dwinputstreamindex: u32, rtmaxlatency: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetInputMaxLatency)(windows_core::Interface::as_raw(self), dwinputstreamindex, rtmaxlatency) } } pub unsafe fn Flush(&self) -> windows_core::HRESULT { @@ -429,12 +439,14 @@ impl IMediaObject { (windows_core::Interface::vtable(self).GetInputStatus)(windows_core::Interface::as_raw(self), dwinputstreamindex, &mut result__).map(|| result__) } } - pub unsafe fn ProcessInput(&self, dwinputstreamindex: u32, pbuffer: P1, dwflags: u32, rttimestamp: REFERENCE_TIME, rttimelength: REFERENCE_TIME) -> windows_core::HRESULT + #[cfg(feature = "ksmedia")] + pub unsafe fn ProcessInput(&self, dwinputstreamindex: u32, pbuffer: P1, dwflags: u32, rttimestamp: super::ksmedia::REFERENCE_TIME, rttimelength: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT where P1: windows_core::Param, { unsafe { (windows_core::Interface::vtable(self).ProcessInput)(windows_core::Interface::as_raw(self), dwinputstreamindex, pbuffer.param().abi(), dwflags, rttimestamp, rttimelength) } } + #[cfg(feature = "ksmedia")] pub unsafe fn ProcessOutput(&self, dwflags: u32, poutputbuffers: &mut [DMO_OUTPUT_DATA_BUFFER], pdwstatus: *mut u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, poutputbuffers.len().try_into().unwrap(), poutputbuffers.as_mut_ptr(), pdwstatus as _) } } @@ -457,17 +469,30 @@ pub struct IMediaObject_Vtbl { pub GetOutputCurrentType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DMO_MEDIA_TYPE) -> windows_core::HRESULT, pub GetInputSizeInfo: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut u32, *mut u32) -> windows_core::HRESULT, pub GetOutputSizeInfo: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut u32) -> windows_core::HRESULT, - pub GetInputMaxLatency: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut REFERENCE_TIME) -> windows_core::HRESULT, - pub SetInputMaxLatency: unsafe extern "system" fn(*mut core::ffi::c_void, u32, REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub GetInputMaxLatency: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + GetInputMaxLatency: usize, + #[cfg(feature = "ksmedia")] + pub SetInputMaxLatency: unsafe extern "system" fn(*mut core::ffi::c_void, u32, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + SetInputMaxLatency: usize, pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub Discontinuity: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, pub AllocateStreamingResources: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub FreeStreamingResources: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub GetInputStatus: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT, - pub ProcessInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32, REFERENCE_TIME, REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub ProcessInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32, super::ksmedia::REFERENCE_TIME, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + ProcessInput: usize, + #[cfg(feature = "ksmedia")] pub ProcessOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut DMO_OUTPUT_DATA_BUFFER, *mut u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + ProcessOutput: usize, pub Lock: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT, } +#[cfg(feature = "ksmedia")] pub trait IMediaObject_Impl: windows_core::IUnknownImpl { fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()>; fn GetInputStreamInfo(&self, dwinputstreamindex: u32) -> windows_core::Result; @@ -480,17 +505,18 @@ pub trait IMediaObject_Impl: windows_core::IUnknownImpl { fn GetOutputCurrentType(&self, dwoutputstreamindex: u32, pmt: *mut DMO_MEDIA_TYPE) -> windows_core::Result<()>; fn GetInputSizeInfo(&self, dwinputstreamindex: u32, pcbsize: *mut u32, pcbmaxlookahead: *mut u32, pcbalignment: *mut u32) -> windows_core::Result<()>; fn GetOutputSizeInfo(&self, dwoutputstreamindex: u32, pcbsize: *mut u32, pcbalignment: *mut u32) -> windows_core::Result<()>; - fn GetInputMaxLatency(&self, dwinputstreamindex: u32) -> windows_core::Result; - fn SetInputMaxLatency(&self, dwinputstreamindex: u32, rtmaxlatency: REFERENCE_TIME) -> windows_core::Result<()>; + fn GetInputMaxLatency(&self, dwinputstreamindex: u32) -> windows_core::Result; + fn SetInputMaxLatency(&self, dwinputstreamindex: u32, rtmaxlatency: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn Flush(&self) -> windows_core::Result<()>; fn Discontinuity(&self, dwinputstreamindex: u32) -> windows_core::Result<()>; fn AllocateStreamingResources(&self) -> windows_core::Result<()>; fn FreeStreamingResources(&self) -> windows_core::Result<()>; fn GetInputStatus(&self, dwinputstreamindex: u32) -> windows_core::Result; - fn ProcessInput(&self, dwinputstreamindex: u32, pbuffer: windows_core::Ref, dwflags: u32, rttimestamp: REFERENCE_TIME, rttimelength: REFERENCE_TIME) -> windows_core::Result<()>; + fn ProcessInput(&self, dwinputstreamindex: u32, pbuffer: windows_core::Ref, dwflags: u32, rttimestamp: super::ksmedia::REFERENCE_TIME, rttimelength: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputbuffers: *mut DMO_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()>; fn Lock(&self, block: i32) -> windows_core::Result<()>; } +#[cfg(feature = "ksmedia")] impl IMediaObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetStreamCount(this: *mut core::ffi::c_void, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::HRESULT { @@ -571,7 +597,7 @@ impl IMediaObject_Vtbl { IMediaObject_Impl::GetOutputSizeInfo(this, core::mem::transmute_copy(&dwoutputstreamindex), core::mem::transmute_copy(&pcbsize), core::mem::transmute_copy(&pcbalignment)).into() } } - unsafe extern "system" fn GetInputMaxLatency(this: *mut core::ffi::c_void, dwinputstreamindex: u32, prtmaxlatency: *mut REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetInputMaxLatency(this: *mut core::ffi::c_void, dwinputstreamindex: u32, prtmaxlatency: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMediaObject_Impl::GetInputMaxLatency(this, core::mem::transmute_copy(&dwinputstreamindex)) { @@ -583,7 +609,7 @@ impl IMediaObject_Vtbl { } } } - unsafe extern "system" fn SetInputMaxLatency(this: *mut core::ffi::c_void, dwinputstreamindex: u32, rtmaxlatency: REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetInputMaxLatency(this: *mut core::ffi::c_void, dwinputstreamindex: u32, rtmaxlatency: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMediaObject_Impl::SetInputMaxLatency(this, core::mem::transmute_copy(&dwinputstreamindex), core::mem::transmute_copy(&rtmaxlatency)).into() @@ -625,7 +651,7 @@ impl IMediaObject_Vtbl { } } } - unsafe extern "system" fn ProcessInput(this: *mut core::ffi::c_void, dwinputstreamindex: u32, pbuffer: *mut core::ffi::c_void, dwflags: u32, rttimestamp: REFERENCE_TIME, rttimelength: REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn ProcessInput(this: *mut core::ffi::c_void, dwinputstreamindex: u32, pbuffer: *mut core::ffi::c_void, dwflags: u32, rttimestamp: super::ksmedia::REFERENCE_TIME, rttimelength: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMediaObject_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamindex), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&rttimestamp), core::mem::transmute_copy(&rttimelength)).into() @@ -672,11 +698,13 @@ impl IMediaObject_Vtbl { iid == &::IID } } +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IMediaObject {} windows_core::imp::define_interface!(IMediaObjectInPlace, IMediaObjectInPlace_Vtbl, 0x651b9ad0_0fc7_4aa9_9538_d89931010741); windows_core::imp::interface_hierarchy!(IMediaObjectInPlace, windows_core::IUnknown); impl IMediaObjectInPlace { - pub unsafe fn Process(&self, pdata: &mut [u8], reftimestart: REFERENCE_TIME, dwflags: u32) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn Process(&self, pdata: &mut [u8], reftimestart: super::ksmedia::REFERENCE_TIME, dwflags: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), pdata.len().try_into().unwrap(), pdata.as_mut_ptr(), reftimestart, dwflags) } } pub unsafe fn Clone(&self) -> windows_core::Result { @@ -685,7 +713,8 @@ impl IMediaObjectInPlace { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } - pub unsafe fn GetLatency(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetLatency(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLatency)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) @@ -696,18 +725,26 @@ impl IMediaObjectInPlace { #[doc(hidden)] pub struct IMediaObjectInPlace_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - pub Process: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8, REFERENCE_TIME, u32) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub Process: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8, super::ksmedia::REFERENCE_TIME, u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + Process: usize, pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, - pub GetLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(feature = "ksmedia")] + pub GetLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] + GetLatency: usize, } +#[cfg(feature = "ksmedia")] pub trait IMediaObjectInPlace_Impl: windows_core::IUnknownImpl { - fn Process(&self, ulsize: u32, pdata: *mut u8, reftimestart: REFERENCE_TIME, dwflags: u32) -> windows_core::Result<()>; + fn Process(&self, ulsize: u32, pdata: *mut u8, reftimestart: super::ksmedia::REFERENCE_TIME, dwflags: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; - fn GetLatency(&self) -> windows_core::Result; + fn GetLatency(&self) -> windows_core::Result; } +#[cfg(feature = "ksmedia")] impl IMediaObjectInPlace_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn Process(this: *mut core::ffi::c_void, ulsize: u32, pdata: *mut u8, reftimestart: REFERENCE_TIME, dwflags: u32) -> windows_core::HRESULT { + unsafe extern "system" fn Process(this: *mut core::ffi::c_void, ulsize: u32, pdata: *mut u8, reftimestart: super::ksmedia::REFERENCE_TIME, dwflags: u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMediaObjectInPlace_Impl::Process(this, core::mem::transmute_copy(&ulsize), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&reftimestart), core::mem::transmute_copy(&dwflags)).into() @@ -725,7 +762,7 @@ impl IMediaObjectInPlace_Vtbl { } } } - unsafe extern "system" fn GetLatency(this: *mut core::ffi::c_void, platencytime: *mut REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetLatency(this: *mut core::ffi::c_void, platencytime: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMediaObjectInPlace_Impl::GetLatency(this) { @@ -748,11 +785,10 @@ impl IMediaObjectInPlace_Vtbl { iid == &::IID } } +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IMediaObjectInPlace {} +#[cfg(feature = "ksmedia")] pub type PDMO_OUTPUT_DATA_BUFFER = *mut DMO_OUTPUT_DATA_BUFFER; -#[repr(transparent)] -#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] -pub struct REFERENCE_TIME(pub i64); pub type _DMO_INPLACE_PROCESS_FLAGS = i32; pub type _DMO_INPUT_DATA_BUFFER_FLAGS = i32; pub type _DMO_INPUT_STATUS_FLAGS = i32; diff --git a/crates/libs/windows/src/Windows/mfapi/mod.rs b/crates/libs/windows/src/Windows/mfapi/mod.rs index 7e1a19f3a7..4f19fdcbd5 100644 --- a/crates/libs/windows/src/Windows/mfapi/mod.rs +++ b/crates/libs/windows/src/Windows/mfapi/mod.rs @@ -705,7 +705,7 @@ where windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMFVideoFormat(pmftype : *mut core::ffi::c_void, pmfvf : *const super::mfobjects::MFVIDEOFORMAT, cbbufsize : u32) -> windows_core::HRESULT); unsafe { MFInitMediaTypeFromMFVideoFormat(pmftype.param().abi(), pmfvf, cbbufsize) } } -#[cfg(all(feature = "amvideo", feature = "mediaobj", feature = "mfobjects", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "amvideo", feature = "ksmedia", feature = "mfobjects", feature = "windef", feature = "wingdi"))] #[inline] pub unsafe fn MFInitMediaTypeFromMPEG1VideoInfo(pmftype: P0, pmp1vi: *const super::amvideo::MPEG1VIDEOINFO, cbbufsize: u32, psubtype: Option<*const windows_core::GUID>) -> windows_core::HRESULT where @@ -723,7 +723,7 @@ where windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG2VideoInfo(pmftype : *mut core::ffi::c_void, pmp2vi : *const MPEG2VIDEOINFO, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT); unsafe { MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), pmp2vi, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _) } } -#[cfg(all(feature = "amvideo", feature = "mediaobj", feature = "mfobjects", feature = "windef", feature = "wingdi"))] +#[cfg(all(feature = "amvideo", feature = "ksmedia", feature = "mfobjects", feature = "windef", feature = "wingdi"))] #[inline] pub unsafe fn MFInitMediaTypeFromVideoInfoHeader(pmftype: P0, pvih: *const super::amvideo::VIDEOINFOHEADER, cbbufsize: u32, psubtype: Option<*const windows_core::GUID>) -> windows_core::HRESULT where diff --git a/crates/libs/windows/src/Windows/mmreg/mod.rs b/crates/libs/windows/src/Windows/mmreg/mod.rs index 98e4915e67..39baffbf1c 100644 --- a/crates/libs/windows/src/Windows/mmreg/mod.rs +++ b/crates/libs/windows/src/Windows/mmreg/mod.rs @@ -317,12 +317,6 @@ pub const JPEG_YCbCr: u32 = 2; #[repr(C)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KSDATAFORMAT_SUBTYPE_IEEE_FLOAT(pub u8); -#[repr(C)] -#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] -pub struct KSDATAFORMAT_SUBTYPE_PCM(pub u8); -#[repr(C)] -#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] -pub struct KSDATAFORMAT_SUBTYPE_WAVEFORMATEX(pub u8); pub type LPADPCMCOEFSET = *mut ADPCMCOEFSET; #[cfg(feature = "mmeapi")] pub type LPADPCMEWAVEFORMAT = *mut ADPCMEWAVEFORMAT; @@ -405,9 +399,9 @@ pub type LPSONARCWAVEFORMAT = *mut SONARCWAVEFORMAT; pub type LPTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; pub type LPVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; pub type LPWAVEFILTER = *mut WAVEFILTER; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type LPWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type LPWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; #[cfg(feature = "mmeapi")] pub type LPWMAUDIO2WAVEFORMAT = *mut WMAUDIO2WAVEFORMAT; @@ -2076,9 +2070,9 @@ pub type NPSONARCWAVEFORMAT = *mut SONARCWAVEFORMAT; pub type NPTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; pub type NPVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; pub type NPWAVEFILTER = *mut WAVEFILTER; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type NPWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type NPWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; #[cfg(feature = "mmeapi")] pub type NPYAMAHA_ADPCMWAVEFORMAT = *mut YAMAHA_ADPCMWAVEFORMAT; @@ -2192,11 +2186,9 @@ pub type PSONARCWAVEFORMAT = *mut SONARCWAVEFORMAT; pub type PTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; pub type PVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; pub type PWAVEFILTER = *mut WAVEFILTER; -#[cfg(feature = "mmeapi")] -pub type PWAVEFORMATEXTENSIBLE = *mut WAVEFORMATEXTENSIBLE; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type PWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; -#[cfg(feature = "mmeapi")] +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] pub type PWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; #[cfg(feature = "mmeapi")] pub type PYAMAHA_ADPCMWAVEFORMAT = *mut YAMAHA_ADPCMWAVEFORMAT; @@ -2269,26 +2261,6 @@ pub struct SONARCWAVEFORMAT { pub wfx: super::mmeapi::WAVEFORMATEX, pub wCompType: u16, } -pub const SPEAKER_ALL: u32 = 2147483648; -pub const SPEAKER_BACK_CENTER: u32 = 256; -pub const SPEAKER_BACK_LEFT: u32 = 16; -pub const SPEAKER_BACK_RIGHT: u32 = 32; -pub const SPEAKER_FRONT_CENTER: u32 = 4; -pub const SPEAKER_FRONT_LEFT: u32 = 1; -pub const SPEAKER_FRONT_LEFT_OF_CENTER: u32 = 64; -pub const SPEAKER_FRONT_RIGHT: u32 = 2; -pub const SPEAKER_FRONT_RIGHT_OF_CENTER: u32 = 128; -pub const SPEAKER_LOW_FREQUENCY: u32 = 8; -pub const SPEAKER_RESERVED: u32 = 2147221504; -pub const SPEAKER_SIDE_LEFT: u32 = 512; -pub const SPEAKER_SIDE_RIGHT: u32 = 1024; -pub const SPEAKER_TOP_BACK_CENTER: u32 = 65536; -pub const SPEAKER_TOP_BACK_LEFT: u32 = 32768; -pub const SPEAKER_TOP_BACK_RIGHT: u32 = 131072; -pub const SPEAKER_TOP_CENTER: u32 = 2048; -pub const SPEAKER_TOP_FRONT_CENTER: u32 = 8192; -pub const SPEAKER_TOP_FRONT_LEFT: u32 = 4096; -pub const SPEAKER_TOP_FRONT_RIGHT: u32 = 16384; #[repr(C, packed(1))] #[cfg(feature = "mmeapi")] #[derive(Clone, Copy)] @@ -2323,39 +2295,10 @@ impl Default for WAVEFILTER { unsafe { core::mem::zeroed() } } } -#[repr(C, packed(1))] -#[cfg(feature = "mmeapi")] -#[derive(Clone, Copy)] -pub struct WAVEFORMATEXTENSIBLE { - pub Format: super::mmeapi::WAVEFORMATEX, - pub Samples: WAVEFORMATEXTENSIBLE_0, - pub dwChannelMask: u32, - pub SubFormat: windows_core::GUID, -} -#[cfg(feature = "mmeapi")] -impl Default for WAVEFORMATEXTENSIBLE { - fn default() -> Self { - unsafe { core::mem::zeroed() } - } -} -#[repr(C, packed(1))] -#[cfg(feature = "mmeapi")] -#[derive(Clone, Copy)] -pub union WAVEFORMATEXTENSIBLE_0 { - pub wValidBitsPerSample: u16, - pub wSamplesPerBlock: u16, - pub wReserved: u16, -} -#[cfg(feature = "mmeapi")] -impl Default for WAVEFORMATEXTENSIBLE_0 { - fn default() -> Self { - unsafe { core::mem::zeroed() } - } -} -#[cfg(feature = "mmeapi")] -pub type WAVEFORMATIEEEFLOATEX = WAVEFORMATEXTENSIBLE; -#[cfg(feature = "mmeapi")] -pub type WAVEFORMATPCMEX = WAVEFORMATEXTENSIBLE; +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] +pub type WAVEFORMATIEEEFLOATEX = super::ksmedia::WAVEFORMATEXTENSIBLE; +#[cfg(all(feature = "ksmedia", feature = "mmeapi"))] +pub type WAVEFORMATPCMEX = super::ksmedia::WAVEFORMATEXTENSIBLE; pub const WAVE_FILTER_DEVELOPMENT: u32 = 65535; pub const WAVE_FILTER_ECHO: u32 = 2; pub const WAVE_FILTER_UNKNOWN: u32 = 0; @@ -2419,7 +2362,6 @@ pub const WAVE_FORMAT_ECHOSC3: u32 = 58; pub const WAVE_FORMAT_ENCORE_G726: u32 = 41223; pub const WAVE_FORMAT_ESPCM: u32 = 97; pub const WAVE_FORMAT_ESST_AC3: u32 = 577; -pub const WAVE_FORMAT_EXTENSIBLE: u32 = 65534; pub const WAVE_FORMAT_FAAD_AAC: u32 = 28781; pub const WAVE_FORMAT_FLAC: u32 = 61868; pub const WAVE_FORMAT_FM_TOWNS_SND: u32 = 768; diff --git a/crates/libs/windows/src/Windows/mod.rs b/crates/libs/windows/src/Windows/mod.rs index de1a88ba9e..a244b6af75 100644 --- a/crates/libs/windows/src/Windows/mod.rs +++ b/crates/libs/windows/src/Windows/mod.rs @@ -210,6 +210,8 @@ pub mod ddeml; pub mod ddraw; #[cfg(feature = "debugapi")] pub mod debugapi; +#[cfg(feature = "devicetopology")] +pub mod devicetopology; #[cfg(feature = "devpkey")] pub mod devpkey; #[cfg(feature = "devpropdef")] @@ -266,6 +268,8 @@ pub mod eaptypes; pub mod edevdefs; #[cfg(feature = "enclaveapi")] pub mod enclaveapi; +#[cfg(feature = "endpointvolume")] +pub mod endpointvolume; #[cfg(feature = "errhandlingapi")] pub mod errhandlingapi; #[cfg(feature = "errors")] diff --git a/crates/libs/windows/src/Windows/strmif/mod.rs b/crates/libs/windows/src/Windows/strmif/mod.rs index ae8d631770..d026e8cb37 100644 --- a/crates/libs/windows/src/Windows/strmif/mod.rs +++ b/crates/libs/windows/src/Windows/strmif/mod.rs @@ -206,21 +206,21 @@ pub const AM_QUERY_DECODER_DXVA_1_SUPPORT: u32 = 2; pub const AM_QUERY_DECODER_VMR_SUPPORT: u32 = 1; pub const AM_RENDEREX_RENDERTOEXISTINGRENDERERS: _AM_RENSDEREXFLAGS = 1; #[repr(C)] -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct AM_SAMPLE2_PROPERTIES { pub cbData: u32, pub dwTypeSpecificFlags: u32, pub dwSampleFlags: u32, pub lActual: i32, - pub tStart: super::mediaobj::REFERENCE_TIME, - pub tStop: super::mediaobj::REFERENCE_TIME, + pub tStart: super::ksmedia::REFERENCE_TIME, + pub tStop: super::ksmedia::REFERENCE_TIME, pub dwStreamId: u32, pub pMediaType: *mut AM_MEDIA_TYPE, pub pbBuffer: *mut u8, pub cbBuffer: i32, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl Default for AM_SAMPLE2_PROPERTIES { fn default() -> Self { unsafe { core::mem::zeroed() } @@ -257,11 +257,11 @@ pub const AM_SEEKING_Segment: AM_SEEKING_SEEKING_FLAGS = 16; pub const AM_SEEKING_Source: AM_SEEKING_SEEKING_CAPABILITIES = 256; pub const AM_STREAM_CONTROL: tagAM_SAMPLE_PROPERTY_FLAGS = 1; #[repr(C)] -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct AM_STREAM_INFO { - pub tStart: super::mediaobj::REFERENCE_TIME, - pub tStop: super::mediaobj::REFERENCE_TIME, + pub tStart: super::ksmedia::REFERENCE_TIME, + pub tStop: super::ksmedia::REFERENCE_TIME, pub dwStartCookie: u32, pub dwStopCookie: u32, pub dwFlags: u32, @@ -1733,8 +1733,8 @@ impl windows_core::RuntimeName for IAMCertifiedOutputProtection {} windows_core::imp::define_interface!(IAMClockAdjust, IAMClockAdjust_Vtbl, 0x4d5466b0_a49c_11d1_abe8_00a0c905f375); windows_core::imp::interface_hierarchy!(IAMClockAdjust, windows_core::IUnknown); impl IAMClockAdjust { - #[cfg(feature = "mediaobj")] - pub unsafe fn SetClockDelta(&self, rtdelta: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetClockDelta(&self, rtdelta: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetClockDelta)(windows_core::Interface::as_raw(self), rtdelta) } } } @@ -1742,19 +1742,19 @@ impl IAMClockAdjust { #[doc(hidden)] pub struct IAMClockAdjust_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(feature = "mediaobj")] - pub SetClockDelta: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub SetClockDelta: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] SetClockDelta: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IAMClockAdjust_Impl: windows_core::IUnknownImpl { - fn SetClockDelta(&self, rtdelta: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn SetClockDelta(&self, rtdelta: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IAMClockAdjust_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn SetClockDelta(this: *mut core::ffi::c_void, rtdelta: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetClockDelta(this: *mut core::ffi::c_void, rtdelta: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAMClockAdjust_Impl::SetClockDelta(this, core::mem::transmute_copy(&rtdelta)).into() @@ -1766,7 +1766,7 @@ impl IAMClockAdjust_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IAMClockAdjust {} windows_core::imp::define_interface!(IAMClockSlave, IAMClockSlave_Vtbl, 0x9fd52741_176d_4b36_8f51_ca8f933223be); windows_core::imp::interface_hierarchy!(IAMClockSlave, windows_core::IUnknown); @@ -3057,8 +3057,8 @@ impl IAMGraphStreams { pub unsafe fn SyncUsingStreamOffset(&self, busestreamoffset: bool) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SyncUsingStreamOffset)(windows_core::Interface::as_raw(self), busestreamoffset.into()) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn SetMaxGraphLatency(&self, rtmaxgraphlatency: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetMaxGraphLatency(&self, rtmaxgraphlatency: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetMaxGraphLatency)(windows_core::Interface::as_raw(self), rtmaxgraphlatency) } } } @@ -3068,18 +3068,18 @@ pub struct IAMGraphStreams_Vtbl { pub base__: windows_core::IUnknown_Vtbl, pub FindUpstreamInterface: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void, u32) -> windows_core::HRESULT, pub SyncUsingStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub SetMaxGraphLatency: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub SetMaxGraphLatency: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] SetMaxGraphLatency: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IAMGraphStreams_Impl: windows_core::IUnknownImpl { fn FindUpstreamInterface(&self, ppin: windows_core::Ref, riid: *const windows_core::GUID, ppvinterface: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()>; fn SyncUsingStreamOffset(&self, busestreamoffset: windows_core::BOOL) -> windows_core::Result<()>; - fn SetMaxGraphLatency(&self, rtmaxgraphlatency: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn SetMaxGraphLatency(&self, rtmaxgraphlatency: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IAMGraphStreams_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindUpstreamInterface(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvinterface: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { @@ -3094,7 +3094,7 @@ impl IAMGraphStreams_Vtbl { IAMGraphStreams_Impl::SyncUsingStreamOffset(this, core::mem::transmute_copy(&busestreamoffset)).into() } } - unsafe extern "system" fn SetMaxGraphLatency(this: *mut core::ffi::c_void, rtmaxgraphlatency: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetMaxGraphLatency(this: *mut core::ffi::c_void, rtmaxgraphlatency: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAMGraphStreams_Impl::SetMaxGraphLatency(this, core::mem::transmute_copy(&rtmaxgraphlatency)).into() @@ -3111,13 +3111,13 @@ impl IAMGraphStreams_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IAMGraphStreams {} windows_core::imp::define_interface!(IAMLatency, IAMLatency_Vtbl, 0x62ea93ba_ec62_11d2_b770_00c04fb6bd3d); windows_core::imp::interface_hierarchy!(IAMLatency, windows_core::IUnknown); impl IAMLatency { - #[cfg(feature = "mediaobj")] - pub unsafe fn GetLatency(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetLatency(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLatency)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) @@ -3128,19 +3128,19 @@ impl IAMLatency { #[doc(hidden)] pub struct IAMLatency_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(feature = "mediaobj")] - pub GetLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetLatency: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IAMLatency_Impl: windows_core::IUnknownImpl { - fn GetLatency(&self) -> windows_core::Result; + fn GetLatency(&self) -> windows_core::Result; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IAMLatency_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn GetLatency(this: *mut core::ffi::c_void, prtlatency: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetLatency(this: *mut core::ffi::c_void, prtlatency: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IAMLatency_Impl::GetLatency(this) { @@ -3158,7 +3158,7 @@ impl IAMLatency_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IAMLatency {} windows_core::imp::define_interface!(IAMOpenProgress, IAMOpenProgress_Vtbl, 0x8e1c39a1_de53_11cf_aa63_0080c744528d); windows_core::imp::interface_hierarchy!(IAMOpenProgress, windows_core::IUnknown); @@ -3458,26 +3458,26 @@ impl IAMPushSource { pub unsafe fn SetPushSourceFlags(&self, flags: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetPushSourceFlags)(windows_core::Interface::as_raw(self), flags) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn SetStreamOffset(&self, rtoffset: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetStreamOffset(&self, rtoffset: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetStreamOffset)(windows_core::Interface::as_raw(self), rtoffset) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetStreamOffset(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetStreamOffset(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamOffset)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetMaxStreamOffset(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetMaxStreamOffset(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMaxStreamOffset)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn SetMaxStreamOffset(&self, rtmaxoffset: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetMaxStreamOffset(&self, rtmaxoffset: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetMaxStreamOffset)(windows_core::Interface::as_raw(self), rtmaxoffset) } } } @@ -3487,33 +3487,33 @@ pub struct IAMPushSource_Vtbl { pub base__: IAMLatency_Vtbl, pub GetPushSourceFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, pub SetPushSourceFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub SetStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub SetStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] SetStreamOffset: usize, - #[cfg(feature = "mediaobj")] - pub GetStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetStreamOffset: usize, - #[cfg(feature = "mediaobj")] - pub GetMaxStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetMaxStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetMaxStreamOffset: usize, - #[cfg(feature = "mediaobj")] - pub SetMaxStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub SetMaxStreamOffset: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] SetMaxStreamOffset: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IAMPushSource_Impl: IAMLatency_Impl { fn GetPushSourceFlags(&self) -> windows_core::Result; fn SetPushSourceFlags(&self, flags: u32) -> windows_core::Result<()>; - fn SetStreamOffset(&self, rtoffset: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; - fn GetStreamOffset(&self) -> windows_core::Result; - fn GetMaxStreamOffset(&self) -> windows_core::Result; - fn SetMaxStreamOffset(&self, rtmaxoffset: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn SetStreamOffset(&self, rtoffset: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; + fn GetStreamOffset(&self) -> windows_core::Result; + fn GetMaxStreamOffset(&self) -> windows_core::Result; + fn SetMaxStreamOffset(&self, rtmaxoffset: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IAMPushSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPushSourceFlags(this: *mut core::ffi::c_void, pflags: *mut u32) -> windows_core::HRESULT { @@ -3534,13 +3534,13 @@ impl IAMPushSource_Vtbl { IAMPushSource_Impl::SetPushSourceFlags(this, core::mem::transmute_copy(&flags)).into() } } - unsafe extern "system" fn SetStreamOffset(this: *mut core::ffi::c_void, rtoffset: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetStreamOffset(this: *mut core::ffi::c_void, rtoffset: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAMPushSource_Impl::SetStreamOffset(this, core::mem::transmute_copy(&rtoffset)).into() } } - unsafe extern "system" fn GetStreamOffset(this: *mut core::ffi::c_void, prtoffset: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetStreamOffset(this: *mut core::ffi::c_void, prtoffset: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IAMPushSource_Impl::GetStreamOffset(this) { @@ -3552,7 +3552,7 @@ impl IAMPushSource_Vtbl { } } } - unsafe extern "system" fn GetMaxStreamOffset(this: *mut core::ffi::c_void, prtmaxoffset: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetMaxStreamOffset(this: *mut core::ffi::c_void, prtmaxoffset: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IAMPushSource_Impl::GetMaxStreamOffset(this) { @@ -3564,7 +3564,7 @@ impl IAMPushSource_Vtbl { } } } - unsafe extern "system" fn SetMaxStreamOffset(this: *mut core::ffi::c_void, rtmaxoffset: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetMaxStreamOffset(this: *mut core::ffi::c_void, rtmaxoffset: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAMPushSource_Impl::SetMaxStreamOffset(this, core::mem::transmute_copy(&rtmaxoffset)).into() @@ -3584,7 +3584,7 @@ impl IAMPushSource_Vtbl { iid == &::IID || iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IAMPushSource {} windows_core::imp::define_interface!(IAMResourceControl, IAMResourceControl_Vtbl, 0x8389d2d0_77d7_11d1_abe6_00a0c905f375); windows_core::imp::interface_hierarchy!(IAMResourceControl, windows_core::IUnknown); @@ -3699,15 +3699,15 @@ impl windows_core::RuntimeName for IAMStreamConfig {} windows_core::imp::define_interface!(IAMStreamControl, IAMStreamControl_Vtbl, 0x36b73881_c2c8_11cf_8b46_00805f6cef60); windows_core::imp::interface_hierarchy!(IAMStreamControl, windows_core::IUnknown); impl IAMStreamControl { - #[cfg(feature = "mediaobj")] - pub unsafe fn StartAt(&self, ptstart: Option<*const super::mediaobj::REFERENCE_TIME>, dwcookie: u32) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn StartAt(&self, ptstart: Option<*const super::ksmedia::REFERENCE_TIME>, dwcookie: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), ptstart.unwrap_or(core::mem::zeroed()) as _, dwcookie) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn StopAt(&self, ptstop: Option<*const super::mediaobj::REFERENCE_TIME>, bsendextra: bool, dwcookie: u32) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn StopAt(&self, ptstop: Option<*const super::ksmedia::REFERENCE_TIME>, bsendextra: bool, dwcookie: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), ptstop.unwrap_or(core::mem::zeroed()) as _, bsendextra.into(), dwcookie) } } - #[cfg(feature = "mediaobj")] + #[cfg(feature = "ksmedia")] pub unsafe fn GetInfo(&self, pinfo: *mut AM_STREAM_INFO) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pinfo as _) } } @@ -3716,35 +3716,35 @@ impl IAMStreamControl { #[doc(hidden)] pub struct IAMStreamControl_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(feature = "mediaobj")] - pub StartAt: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, u32) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub StartAt: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] StartAt: usize, - #[cfg(feature = "mediaobj")] - pub StopAt: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, windows_core::BOOL, u32) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub StopAt: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, windows_core::BOOL, u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] StopAt: usize, - #[cfg(feature = "mediaobj")] + #[cfg(feature = "ksmedia")] pub GetInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut AM_STREAM_INFO) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(not(feature = "ksmedia"))] GetInfo: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IAMStreamControl_Impl: windows_core::IUnknownImpl { - fn StartAt(&self, ptstart: *const super::mediaobj::REFERENCE_TIME, dwcookie: u32) -> windows_core::Result<()>; - fn StopAt(&self, ptstop: *const super::mediaobj::REFERENCE_TIME, bsendextra: windows_core::BOOL, dwcookie: u32) -> windows_core::Result<()>; + fn StartAt(&self, ptstart: *const super::ksmedia::REFERENCE_TIME, dwcookie: u32) -> windows_core::Result<()>; + fn StopAt(&self, ptstop: *const super::ksmedia::REFERENCE_TIME, bsendextra: windows_core::BOOL, dwcookie: u32) -> windows_core::Result<()>; fn GetInfo(&self, pinfo: *mut AM_STREAM_INFO) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IAMStreamControl_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn StartAt(this: *mut core::ffi::c_void, ptstart: *const super::mediaobj::REFERENCE_TIME, dwcookie: u32) -> windows_core::HRESULT { + unsafe extern "system" fn StartAt(this: *mut core::ffi::c_void, ptstart: *const super::ksmedia::REFERENCE_TIME, dwcookie: u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAMStreamControl_Impl::StartAt(this, core::mem::transmute_copy(&ptstart), core::mem::transmute_copy(&dwcookie)).into() } } - unsafe extern "system" fn StopAt(this: *mut core::ffi::c_void, ptstop: *const super::mediaobj::REFERENCE_TIME, bsendextra: windows_core::BOOL, dwcookie: u32) -> windows_core::HRESULT { + unsafe extern "system" fn StopAt(this: *mut core::ffi::c_void, ptstop: *const super::ksmedia::REFERENCE_TIME, bsendextra: windows_core::BOOL, dwcookie: u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IAMStreamControl_Impl::StopAt(this, core::mem::transmute_copy(&ptstop), core::mem::transmute_copy(&bsendextra), core::mem::transmute_copy(&dwcookie)).into() @@ -3767,7 +3767,7 @@ impl IAMStreamControl_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IAMStreamControl {} windows_core::imp::define_interface!(IAMStreamSelect, IAMStreamSelect_Vtbl, 0xc1960960_17f5_11d1_abe1_00a0c905f375); windows_core::imp::interface_hierarchy!(IAMStreamSelect, windows_core::IUnknown); @@ -5765,7 +5765,7 @@ pub struct IBaseFilter_Vtbl { pub JoinFilterGraph: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, pub QueryVendorInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "objidl"))] pub trait IBaseFilter_Impl: IMediaFilter_Impl { fn EnumPins(&self) -> windows_core::Result; fn FindPin(&self, id: &windows_core::PCWSTR) -> windows_core::Result; @@ -5773,7 +5773,7 @@ pub trait IBaseFilter_Impl: IMediaFilter_Impl { fn JoinFilterGraph(&self, pgraph: windows_core::Ref, pname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn QueryVendorInfo(&self) -> windows_core::Result; } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "objidl"))] impl IBaseFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnumPins(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -5837,7 +5837,7 @@ impl IBaseFilter_Vtbl { iid == &::IID || iid == &::IID || iid == &::IID } } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "objidl"))] impl windows_core::RuntimeName for IBaseFilter {} windows_core::imp::define_interface!(ICaptureGraphBuilder, ICaptureGraphBuilder_Vtbl, 0xbf87b6e0_8c27_11d0_b3f0_00aa003761c5); windows_core::imp::interface_hierarchy!(ICaptureGraphBuilder, windows_core::IUnknown); @@ -5879,8 +5879,8 @@ impl ICaptureGraphBuilder { { unsafe { (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()) } } - #[cfg(all(feature = "mediaobj", feature = "objidl"))] - pub unsafe fn ControlStream(&self, pcategory: Option<*const windows_core::GUID>, pfilter: P1, pstart: *const super::mediaobj::REFERENCE_TIME, pstop: *const super::mediaobj::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT + #[cfg(all(feature = "ksmedia", feature = "objidl"))] + pub unsafe fn ControlStream(&self, pcategory: Option<*const windows_core::GUID>, pfilter: P1, pstart: *const super::ksmedia::REFERENCE_TIME, pstop: *const super::ksmedia::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT where P1: windows_core::Param, { @@ -5920,9 +5920,9 @@ pub struct ICaptureGraphBuilder_Vtbl { pub RenderStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, #[cfg(not(feature = "objidl"))] RenderStream: usize, - #[cfg(all(feature = "mediaobj", feature = "objidl"))] - pub ControlStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, *const super::mediaobj::REFERENCE_TIME, u16, u16) -> windows_core::HRESULT, - #[cfg(not(all(feature = "mediaobj", feature = "objidl")))] + #[cfg(all(feature = "ksmedia", feature = "objidl"))] + pub ControlStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, *const super::ksmedia::REFERENCE_TIME, u16, u16) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ksmedia", feature = "objidl")))] ControlStream: usize, #[cfg(feature = "winnt")] pub AllocCapFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, super::winnt::DWORDLONG) -> windows_core::HRESULT, @@ -5930,18 +5930,18 @@ pub struct ICaptureGraphBuilder_Vtbl { AllocCapFile: usize, pub CopyCaptureFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] pub trait ICaptureGraphBuilder_Impl: windows_core::IUnknownImpl { fn SetFiltergraph(&self, pfg: windows_core::Ref) -> windows_core::Result<()>; fn GetFiltergraph(&self) -> windows_core::Result; fn SetOutputFileName(&self, ptype: *const windows_core::GUID, lpstrfile: &windows_core::PCWSTR, ppf: windows_core::OutRef, ppsink: windows_core::OutRef) -> windows_core::Result<()>; fn FindInterface(&self, pcategory: *const windows_core::GUID, pf: windows_core::Ref, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn RenderStream(&self, pcategory: *const windows_core::GUID, psource: windows_core::Ref, pfcompressor: windows_core::Ref, pfrenderer: windows_core::Ref) -> windows_core::Result<()>; - fn ControlStream(&self, pcategory: *const windows_core::GUID, pfilter: windows_core::Ref, pstart: *const super::mediaobj::REFERENCE_TIME, pstop: *const super::mediaobj::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; + fn ControlStream(&self, pcategory: *const windows_core::GUID, pfilter: windows_core::Ref, pstart: *const super::ksmedia::REFERENCE_TIME, pstop: *const super::ksmedia::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; fn AllocCapFile(&self, lpstr: &windows_core::PCWSTR, dwlsize: super::winnt::DWORDLONG) -> windows_core::Result<()>; fn CopyCaptureFile(&self, lpwstrold: &windows_core::PCWSTR, lpwstrnew: &windows_core::PCWSTR, fallowescabort: i32, pcallback: windows_core::Ref) -> windows_core::Result<()>; } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] impl ICaptureGraphBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFiltergraph(this: *mut core::ffi::c_void, pfg: *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -5980,7 +5980,7 @@ impl ICaptureGraphBuilder_Vtbl { ICaptureGraphBuilder_Impl::RenderStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&psource), core::mem::transmute_copy(&pfcompressor), core::mem::transmute_copy(&pfrenderer)).into() } } - unsafe extern "system" fn ControlStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, pfilter: *mut core::ffi::c_void, pstart: *const super::mediaobj::REFERENCE_TIME, pstop: *const super::mediaobj::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT { + unsafe extern "system" fn ControlStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, pfilter: *mut core::ffi::c_void, pstart: *const super::ksmedia::REFERENCE_TIME, pstop: *const super::ksmedia::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); ICaptureGraphBuilder_Impl::ControlStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pstop), core::mem::transmute_copy(&wstartcookie), core::mem::transmute_copy(&wstopcookie)).into() @@ -6014,7 +6014,7 @@ impl ICaptureGraphBuilder_Vtbl { iid == &::IID } } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] impl windows_core::RuntimeName for ICaptureGraphBuilder {} windows_core::imp::define_interface!(ICaptureGraphBuilder2, ICaptureGraphBuilder2_Vtbl, 0x93e5a4e0_2d50_11d2_abfa_00a0c9c6e38d); windows_core::imp::interface_hierarchy!(ICaptureGraphBuilder2, windows_core::IUnknown); @@ -6056,8 +6056,8 @@ impl ICaptureGraphBuilder2 { { unsafe { (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, ptype, psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()) } } - #[cfg(all(feature = "mediaobj", feature = "objidl"))] - pub unsafe fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: P2, pstart: Option<*const super::mediaobj::REFERENCE_TIME>, pstop: Option<*const super::mediaobj::REFERENCE_TIME>, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT + #[cfg(all(feature = "ksmedia", feature = "objidl"))] + pub unsafe fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: P2, pstart: Option<*const super::ksmedia::REFERENCE_TIME>, pstop: Option<*const super::ksmedia::REFERENCE_TIME>, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT where P2: windows_core::Param, { @@ -6106,9 +6106,9 @@ pub struct ICaptureGraphBuilder2_Vtbl { pub RenderStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, #[cfg(not(feature = "objidl"))] RenderStream: usize, - #[cfg(all(feature = "mediaobj", feature = "objidl"))] - pub ControlStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, *const super::mediaobj::REFERENCE_TIME, u16, u16) -> windows_core::HRESULT, - #[cfg(not(all(feature = "mediaobj", feature = "objidl")))] + #[cfg(all(feature = "ksmedia", feature = "objidl"))] + pub ControlStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, *const super::ksmedia::REFERENCE_TIME, u16, u16) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ksmedia", feature = "objidl")))] ControlStream: usize, #[cfg(feature = "winnt")] pub AllocCapFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, super::winnt::DWORDLONG) -> windows_core::HRESULT, @@ -6117,19 +6117,19 @@ pub struct ICaptureGraphBuilder2_Vtbl { pub CopyCaptureFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, pub FindPin: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, PIN_DIRECTION, *const windows_core::GUID, *const windows_core::GUID, windows_core::BOOL, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] pub trait ICaptureGraphBuilder2_Impl: windows_core::IUnknownImpl { fn SetFiltergraph(&self, pfg: windows_core::Ref) -> windows_core::Result<()>; fn GetFiltergraph(&self) -> windows_core::Result; fn SetOutputFileName(&self, ptype: *const windows_core::GUID, lpstrfile: &windows_core::PCWSTR, ppf: windows_core::OutRef, ppsink: windows_core::OutRef) -> windows_core::Result<()>; fn FindInterface(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pf: windows_core::Ref, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn RenderStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, psource: windows_core::Ref, pfcompressor: windows_core::Ref, pfrenderer: windows_core::Ref) -> windows_core::Result<()>; - fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: windows_core::Ref, pstart: *const super::mediaobj::REFERENCE_TIME, pstop: *const super::mediaobj::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; + fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: windows_core::Ref, pstart: *const super::ksmedia::REFERENCE_TIME, pstop: *const super::ksmedia::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; fn AllocCapFile(&self, lpstr: &windows_core::PCWSTR, dwlsize: super::winnt::DWORDLONG) -> windows_core::Result<()>; fn CopyCaptureFile(&self, lpwstrold: &windows_core::PCWSTR, lpwstrnew: &windows_core::PCWSTR, fallowescabort: i32, pcallback: windows_core::Ref) -> windows_core::Result<()>; fn FindPin(&self, psource: windows_core::Ref, pindir: PIN_DIRECTION, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, funconnected: windows_core::BOOL, num: i32) -> windows_core::Result; } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] impl ICaptureGraphBuilder2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFiltergraph(this: *mut core::ffi::c_void, pfg: *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -6168,7 +6168,7 @@ impl ICaptureGraphBuilder2_Vtbl { ICaptureGraphBuilder2_Impl::RenderStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&psource), core::mem::transmute_copy(&pfcompressor), core::mem::transmute_copy(&pfrenderer)).into() } } - unsafe extern "system" fn ControlStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: *mut core::ffi::c_void, pstart: *const super::mediaobj::REFERENCE_TIME, pstop: *const super::mediaobj::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT { + unsafe extern "system" fn ControlStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: *mut core::ffi::c_void, pstart: *const super::ksmedia::REFERENCE_TIME, pstop: *const super::ksmedia::REFERENCE_TIME, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); ICaptureGraphBuilder2_Impl::ControlStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pstop), core::mem::transmute_copy(&wstartcookie), core::mem::transmute_copy(&wstopcookie)).into() @@ -6215,7 +6215,7 @@ impl ICaptureGraphBuilder2_Vtbl { iid == &::IID } } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] impl windows_core::RuntimeName for ICaptureGraphBuilder2 {} windows_core::imp::define_interface!(ICodecAPI, ICodecAPI_Vtbl, 0x901db4c7_31ce_41a2_85dc_8fa0bf41b8da); windows_core::imp::interface_hierarchy!(ICodecAPI, windows_core::IUnknown); @@ -6585,12 +6585,12 @@ impl IConfigInterleaving { (windows_core::Interface::vtable(self).get_Mode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn put_Interleaving(&self, prtinterleave: *const super::mediaobj::REFERENCE_TIME, prtpreroll: *const super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn put_Interleaving(&self, prtinterleave: *const super::ksmedia::REFERENCE_TIME, prtpreroll: *const super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).put_Interleaving)(windows_core::Interface::as_raw(self), prtinterleave, prtpreroll) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn get_Interleaving(&self, prtinterleave: *mut super::mediaobj::REFERENCE_TIME, prtpreroll: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn get_Interleaving(&self, prtinterleave: *mut super::ksmedia::REFERENCE_TIME, prtpreroll: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).get_Interleaving)(windows_core::Interface::as_raw(self), prtinterleave as _, prtpreroll as _) } } } @@ -6600,23 +6600,23 @@ pub struct IConfigInterleaving_Vtbl { pub base__: windows_core::IUnknown_Vtbl, pub put_Mode: unsafe extern "system" fn(*mut core::ffi::c_void, InterleavingMode) -> windows_core::HRESULT, pub get_Mode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut InterleavingMode) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub put_Interleaving: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, *const super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub put_Interleaving: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, *const super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] put_Interleaving: usize, - #[cfg(feature = "mediaobj")] - pub get_Interleaving: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub get_Interleaving: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] get_Interleaving: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IConfigInterleaving_Impl: windows_core::IUnknownImpl { fn put_Mode(&self, mode: InterleavingMode) -> windows_core::Result<()>; fn get_Mode(&self) -> windows_core::Result; - fn put_Interleaving(&self, prtinterleave: *const super::mediaobj::REFERENCE_TIME, prtpreroll: *const super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; - fn get_Interleaving(&self, prtinterleave: *mut super::mediaobj::REFERENCE_TIME, prtpreroll: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn put_Interleaving(&self, prtinterleave: *const super::ksmedia::REFERENCE_TIME, prtpreroll: *const super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; + fn get_Interleaving(&self, prtinterleave: *mut super::ksmedia::REFERENCE_TIME, prtpreroll: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IConfigInterleaving_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn put_Mode(this: *mut core::ffi::c_void, mode: InterleavingMode) -> windows_core::HRESULT { @@ -6637,13 +6637,13 @@ impl IConfigInterleaving_Vtbl { } } } - unsafe extern "system" fn put_Interleaving(this: *mut core::ffi::c_void, prtinterleave: *const super::mediaobj::REFERENCE_TIME, prtpreroll: *const super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn put_Interleaving(this: *mut core::ffi::c_void, prtinterleave: *const super::ksmedia::REFERENCE_TIME, prtpreroll: *const super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IConfigInterleaving_Impl::put_Interleaving(this, core::mem::transmute_copy(&prtinterleave), core::mem::transmute_copy(&prtpreroll)).into() } } - unsafe extern "system" fn get_Interleaving(this: *mut core::ffi::c_void, prtinterleave: *mut super::mediaobj::REFERENCE_TIME, prtpreroll: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn get_Interleaving(this: *mut core::ffi::c_void, prtinterleave: *mut super::ksmedia::REFERENCE_TIME, prtpreroll: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IConfigInterleaving_Impl::get_Interleaving(this, core::mem::transmute_copy(&prtinterleave), core::mem::transmute_copy(&prtpreroll)).into() @@ -6661,7 +6661,7 @@ impl IConfigInterleaving_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IConfigInterleaving {} windows_core::imp::define_interface!(ICreateDevEnum, ICreateDevEnum_Vtbl, 0x29840822_5b84_11d0_bd3b_00a0c911ce86); windows_core::imp::interface_hierarchy!(ICreateDevEnum, windows_core::IUnknown); @@ -7071,8 +7071,8 @@ impl IDistributorNotify { pub unsafe fn Pause(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn Run(&self, tstart: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn Run(&self, tstart: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self), tstart) } } #[cfg(feature = "dsound")] @@ -7092,9 +7092,9 @@ pub struct IDistributorNotify_Vtbl { pub base__: windows_core::IUnknown_Vtbl, pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub Run: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub Run: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] Run: usize, #[cfg(feature = "dsound")] pub SetSyncSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, @@ -7102,15 +7102,15 @@ pub struct IDistributorNotify_Vtbl { SetSyncSource: usize, pub NotifyGraphChange: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } -#[cfg(all(feature = "dsound", feature = "mediaobj"))] +#[cfg(all(feature = "dsound", feature = "ksmedia"))] pub trait IDistributorNotify_Impl: windows_core::IUnknownImpl { fn Stop(&self) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; - fn Run(&self, tstart: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn Run(&self, tstart: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn SetSyncSource(&self, pclock: windows_core::Ref) -> windows_core::Result<()>; fn NotifyGraphChange(&self) -> windows_core::Result<()>; } -#[cfg(all(feature = "dsound", feature = "mediaobj"))] +#[cfg(all(feature = "dsound", feature = "ksmedia"))] impl IDistributorNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -7125,7 +7125,7 @@ impl IDistributorNotify_Vtbl { IDistributorNotify_Impl::Pause(this).into() } } - unsafe extern "system" fn Run(this: *mut core::ffi::c_void, tstart: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn Run(this: *mut core::ffi::c_void, tstart: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IDistributorNotify_Impl::Run(this, core::mem::transmute_copy(&tstart)).into() @@ -7156,7 +7156,7 @@ impl IDistributorNotify_Vtbl { iid == &::IID } } -#[cfg(all(feature = "dsound", feature = "mediaobj"))] +#[cfg(all(feature = "dsound", feature = "ksmedia"))] impl windows_core::RuntimeName for IDistributorNotify {} windows_core::imp::define_interface!(IDrawVideoImage, IDrawVideoImage_Vtbl, 0x48efb120_ab49_11d2_aed2_00a0c995e8d5); windows_core::imp::interface_hierarchy!(IDrawVideoImage, windows_core::IUnknown); @@ -11361,8 +11361,8 @@ impl IGraphConfig { { unsafe { (windows_core::Interface::vtable(self).RemoveFilterFromCache)(windows_core::Interface::as_raw(self), pfilter.param().abi()) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetStartTime(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetStartTime(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStartTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) @@ -11422,9 +11422,9 @@ pub struct IGraphConfig_Vtbl { pub RemoveFilterFromCache: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, #[cfg(not(feature = "objidl"))] RemoveFilterFromCache: usize, - #[cfg(feature = "mediaobj")] - pub GetStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetStartTime: usize, #[cfg(feature = "winnt")] pub PushThroughData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, super::winnt::HANDLE) -> windows_core::HRESULT, @@ -11443,20 +11443,20 @@ pub struct IGraphConfig_Vtbl { #[cfg(not(feature = "objidl"))] RemoveFilterEx: usize, } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] pub trait IGraphConfig_Impl: windows_core::IUnknownImpl { fn Reconnect(&self, poutputpin: windows_core::Ref, pinputpin: windows_core::Ref, pmtfirstconnection: *const AM_MEDIA_TYPE, pusingfilter: windows_core::Ref, habortevent: super::winnt::HANDLE, dwflags: u32) -> windows_core::Result<()>; fn Reconfigure(&self, pcallback: windows_core::Ref, pvcontext: *const core::ffi::c_void, dwflags: u32, habortevent: super::winnt::HANDLE) -> windows_core::Result<()>; fn AddFilterToCache(&self, pfilter: windows_core::Ref) -> windows_core::Result<()>; fn EnumCacheFilter(&self) -> windows_core::Result; fn RemoveFilterFromCache(&self, pfilter: windows_core::Ref) -> windows_core::Result<()>; - fn GetStartTime(&self) -> windows_core::Result; + fn GetStartTime(&self) -> windows_core::Result; fn PushThroughData(&self, poutputpin: windows_core::Ref, pconnection: windows_core::Ref, heventabort: super::winnt::HANDLE) -> windows_core::Result<()>; fn SetFilterFlags(&self, pfilter: windows_core::Ref, dwflags: u32) -> windows_core::Result<()>; fn GetFilterFlags(&self, pfilter: windows_core::Ref) -> windows_core::Result; fn RemoveFilterEx(&self, pfilter: windows_core::Ref, flags: u32) -> windows_core::Result<()>; } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] impl IGraphConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Reconnect(this: *mut core::ffi::c_void, poutputpin: *mut core::ffi::c_void, pinputpin: *mut core::ffi::c_void, pmtfirstconnection: *const AM_MEDIA_TYPE, pusingfilter: *mut core::ffi::c_void, habortevent: super::winnt::HANDLE, dwflags: u32) -> windows_core::HRESULT { @@ -11495,7 +11495,7 @@ impl IGraphConfig_Vtbl { IGraphConfig_Impl::RemoveFilterFromCache(this, core::mem::transmute_copy(&pfilter)).into() } } - unsafe extern "system" fn GetStartTime(this: *mut core::ffi::c_void, prtstart: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetStartTime(this: *mut core::ffi::c_void, prtstart: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IGraphConfig_Impl::GetStartTime(this) { @@ -11555,7 +11555,7 @@ impl IGraphConfig_Vtbl { iid == &::IID } } -#[cfg(all(feature = "mediaobj", feature = "objidl", feature = "winnt"))] +#[cfg(all(feature = "ksmedia", feature = "objidl", feature = "winnt"))] impl windows_core::RuntimeName for IGraphConfig {} windows_core::imp::define_interface!(IGraphConfigCallback, IGraphConfigCallback_Vtbl, 0xade0fd60_d19d_11d2_abf6_00a0c905f375); windows_core::imp::interface_hierarchy!(IGraphConfigCallback, windows_core::IUnknown); @@ -11800,8 +11800,8 @@ impl IMediaFilter { pub unsafe fn Pause(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn Run(&self, tstart: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn Run(&self, tstart: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self), tstart) } } pub unsafe fn GetState(&self, dwmillisecstimeout: u32) -> windows_core::Result { @@ -11832,9 +11832,9 @@ pub struct IMediaFilter_Vtbl { pub base__: super::objidl::IPersist_Vtbl, pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub Run: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub Run: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] Run: usize, pub GetState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut FILTER_STATE) -> windows_core::HRESULT, #[cfg(feature = "dsound")] @@ -11846,16 +11846,16 @@ pub struct IMediaFilter_Vtbl { #[cfg(not(feature = "dsound"))] GetSyncSource: usize, } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "objidl"))] pub trait IMediaFilter_Impl: super::objidl::IPersist_Impl { fn Stop(&self) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; - fn Run(&self, tstart: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn Run(&self, tstart: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn GetState(&self, dwmillisecstimeout: u32) -> windows_core::Result; fn SetSyncSource(&self, pclock: windows_core::Ref) -> windows_core::Result<()>; fn GetSyncSource(&self) -> windows_core::Result; } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "objidl"))] impl IMediaFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -11870,7 +11870,7 @@ impl IMediaFilter_Vtbl { IMediaFilter_Impl::Pause(this).into() } } - unsafe extern "system" fn Run(this: *mut core::ffi::c_void, tstart: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn Run(this: *mut core::ffi::c_void, tstart: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMediaFilter_Impl::Run(this, core::mem::transmute_copy(&tstart)).into() @@ -11920,7 +11920,7 @@ impl IMediaFilter_Vtbl { iid == &::IID || iid == &::IID } } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "objidl"))] impl windows_core::RuntimeName for IMediaFilter {} #[cfg(feature = "oaidl")] windows_core::imp::define_interface!(IMediaPropertyBag, IMediaPropertyBag_Vtbl, 0x6025a880_c0d5_11d0_bd4e_00a0c911ce86); @@ -11983,12 +11983,12 @@ impl IMediaSample { pub unsafe fn GetSize(&self) -> i32 { unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self)) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetTime(&self, ptimestart: *mut super::mediaobj::REFERENCE_TIME, ptimeend: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetTime(&self, ptimestart: *mut super::ksmedia::REFERENCE_TIME, ptimeend: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), ptimestart as _, ptimeend as _) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn SetTime(&self, ptimestart: Option<*const super::mediaobj::REFERENCE_TIME>, ptimeend: Option<*const super::mediaobj::REFERENCE_TIME>) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetTime(&self, ptimestart: Option<*const super::ksmedia::REFERENCE_TIME>, ptimeend: Option<*const super::ksmedia::REFERENCE_TIME>) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetTime)(windows_core::Interface::as_raw(self), ptimestart.unwrap_or(core::mem::zeroed()) as _, ptimeend.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn IsSyncPoint(&self) -> windows_core::HRESULT { @@ -12037,13 +12037,13 @@ pub struct IMediaSample_Vtbl { pub base__: windows_core::IUnknown_Vtbl, pub GetPointer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8) -> windows_core::HRESULT, pub GetSize: unsafe extern "system" fn(*mut core::ffi::c_void) -> i32, - #[cfg(feature = "mediaobj")] - pub GetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetTime: usize, - #[cfg(feature = "mediaobj")] - pub SetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, *const super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub SetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, *const super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] SetTime: usize, pub IsSyncPoint: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub SetSyncPoint: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT, @@ -12058,12 +12058,12 @@ pub struct IMediaSample_Vtbl { pub GetMediaTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64, *mut i64) -> windows_core::HRESULT, pub SetMediaTime: unsafe extern "system" fn(*mut core::ffi::c_void, *const i64, *const i64) -> windows_core::HRESULT, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IMediaSample_Impl: windows_core::IUnknownImpl { fn GetPointer(&self) -> windows_core::Result<*mut u8>; fn GetSize(&self) -> i32; - fn GetTime(&self, ptimestart: *mut super::mediaobj::REFERENCE_TIME, ptimeend: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; - fn SetTime(&self, ptimestart: *const super::mediaobj::REFERENCE_TIME, ptimeend: *const super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; + fn GetTime(&self, ptimestart: *mut super::ksmedia::REFERENCE_TIME, ptimeend: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; + fn SetTime(&self, ptimestart: *const super::ksmedia::REFERENCE_TIME, ptimeend: *const super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; fn IsSyncPoint(&self) -> windows_core::Result<()>; fn SetSyncPoint(&self, bissyncpoint: windows_core::BOOL) -> windows_core::Result<()>; fn IsPreroll(&self) -> windows_core::Result<()>; @@ -12077,7 +12077,7 @@ pub trait IMediaSample_Impl: windows_core::IUnknownImpl { fn GetMediaTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()>; fn SetMediaTime(&self, ptimestart: *const i64, ptimeend: *const i64) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IMediaSample_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPointer(this: *mut core::ffi::c_void, ppbuffer: *mut *mut u8) -> windows_core::HRESULT { @@ -12098,13 +12098,13 @@ impl IMediaSample_Vtbl { IMediaSample_Impl::GetSize(this) } } - unsafe extern "system" fn GetTime(this: *mut core::ffi::c_void, ptimestart: *mut super::mediaobj::REFERENCE_TIME, ptimeend: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetTime(this: *mut core::ffi::c_void, ptimestart: *mut super::ksmedia::REFERENCE_TIME, ptimeend: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMediaSample_Impl::GetTime(this, core::mem::transmute_copy(&ptimestart), core::mem::transmute_copy(&ptimeend)).into() } } - unsafe extern "system" fn SetTime(this: *mut core::ffi::c_void, ptimestart: *const super::mediaobj::REFERENCE_TIME, ptimeend: *const super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetTime(this: *mut core::ffi::c_void, ptimestart: *const super::ksmedia::REFERENCE_TIME, ptimeend: *const super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMediaSample_Impl::SetTime(this, core::mem::transmute_copy(&ptimestart), core::mem::transmute_copy(&ptimeend)).into() @@ -12212,7 +12212,7 @@ impl IMediaSample_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IMediaSample {} windows_core::imp::define_interface!(IMediaSample2, IMediaSample2_Vtbl, 0x36b73884_c2c8_11cf_8b46_00805f6cef60); impl core::ops::Deref for IMediaSample2 { @@ -12237,12 +12237,12 @@ pub struct IMediaSample2_Vtbl { pub GetProperties: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT, pub SetProperties: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8) -> windows_core::HRESULT, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IMediaSample2_Impl: IMediaSample_Impl { fn GetProperties(&self, cbproperties: u32, pbproperties: *mut u8) -> windows_core::Result<()>; fn SetProperties(&self, cbproperties: u32, pbproperties: *const u8) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IMediaSample2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetProperties(this: *mut core::ffi::c_void, cbproperties: u32, pbproperties: *mut u8) -> windows_core::HRESULT { @@ -12267,7 +12267,7 @@ impl IMediaSample2_Vtbl { iid == &::IID || iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IMediaSample2 {} windows_core::imp::define_interface!(IMediaSample2Config, IMediaSample2Config_Vtbl, 0x68961e68_832b_41ea_bc91_63593f3e70e3); windows_core::imp::interface_hierarchy!(IMediaSample2Config, windows_core::IUnknown); @@ -12628,8 +12628,8 @@ impl IMemAllocator { pub unsafe fn Decommit(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Decommit)(windows_core::Interface::as_raw(self)) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetBuffer(&self, ppbuffer: *mut Option, pstarttime: Option<*const super::mediaobj::REFERENCE_TIME>, pendtime: Option<*const super::mediaobj::REFERENCE_TIME>, dwflags: u32) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetBuffer(&self, ppbuffer: *mut Option, pstarttime: Option<*const super::ksmedia::REFERENCE_TIME>, pendtime: Option<*const super::ksmedia::REFERENCE_TIME>, dwflags: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer), pstarttime.unwrap_or(core::mem::zeroed()) as _, pendtime.unwrap_or(core::mem::zeroed()) as _, dwflags) } } pub unsafe fn ReleaseBuffer(&self, pbuffer: P0) -> windows_core::HRESULT @@ -12647,22 +12647,22 @@ pub struct IMemAllocator_Vtbl { pub GetProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ALLOCATOR_PROPERTIES) -> windows_core::HRESULT, pub Commit: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub Decommit: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub GetBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *const super::mediaobj::REFERENCE_TIME, *const super::mediaobj::REFERENCE_TIME, u32) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *const super::ksmedia::REFERENCE_TIME, *const super::ksmedia::REFERENCE_TIME, u32) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetBuffer: usize, pub ReleaseBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IMemAllocator_Impl: windows_core::IUnknownImpl { fn SetProperties(&self, prequest: *const ALLOCATOR_PROPERTIES) -> windows_core::Result; fn GetProperties(&self) -> windows_core::Result; fn Commit(&self) -> windows_core::Result<()>; fn Decommit(&self) -> windows_core::Result<()>; - fn GetBuffer(&self, ppbuffer: windows_core::OutRef, pstarttime: *const super::mediaobj::REFERENCE_TIME, pendtime: *const super::mediaobj::REFERENCE_TIME, dwflags: u32) -> windows_core::Result<()>; + fn GetBuffer(&self, ppbuffer: windows_core::OutRef, pstarttime: *const super::ksmedia::REFERENCE_TIME, pendtime: *const super::ksmedia::REFERENCE_TIME, dwflags: u32) -> windows_core::Result<()>; fn ReleaseBuffer(&self, pbuffer: windows_core::Ref) -> windows_core::Result<()>; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IMemAllocator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetProperties(this: *mut core::ffi::c_void, prequest: *const ALLOCATOR_PROPERTIES, pactual: *mut ALLOCATOR_PROPERTIES) -> windows_core::HRESULT { @@ -12701,7 +12701,7 @@ impl IMemAllocator_Vtbl { IMemAllocator_Impl::Decommit(this).into() } } - unsafe extern "system" fn GetBuffer(this: *mut core::ffi::c_void, ppbuffer: *mut *mut core::ffi::c_void, pstarttime: *const super::mediaobj::REFERENCE_TIME, pendtime: *const super::mediaobj::REFERENCE_TIME, dwflags: u32) -> windows_core::HRESULT { + unsafe extern "system" fn GetBuffer(this: *mut core::ffi::c_void, ppbuffer: *mut *mut core::ffi::c_void, pstarttime: *const super::ksmedia::REFERENCE_TIME, pendtime: *const super::ksmedia::REFERENCE_TIME, dwflags: u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMemAllocator_Impl::GetBuffer(this, core::mem::transmute_copy(&ppbuffer), core::mem::transmute_copy(&pstarttime), core::mem::transmute_copy(&pendtime), core::mem::transmute_copy(&dwflags)).into() @@ -12727,7 +12727,7 @@ impl IMemAllocator_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IMemAllocator {} windows_core::imp::define_interface!(IMemAllocatorCallbackTemp, IMemAllocatorCallbackTemp_Vtbl, 0x379a0cf0_c1de_11d2_abf5_00a0c905f375); impl core::ops::Deref for IMemAllocatorCallbackTemp { @@ -12758,12 +12758,12 @@ pub struct IMemAllocatorCallbackTemp_Vtbl { pub SetNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, pub GetFreeCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IMemAllocatorCallbackTemp_Impl: IMemAllocator_Impl { fn SetNotify(&self, pnotify: windows_core::Ref) -> windows_core::Result<()>; fn GetFreeCount(&self) -> windows_core::Result; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IMemAllocatorCallbackTemp_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetNotify(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -12790,7 +12790,7 @@ impl IMemAllocatorCallbackTemp_Vtbl { iid == &::IID || iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IMemAllocatorCallbackTemp {} windows_core::imp::define_interface!(IMemAllocatorNotifyCallbackTemp, IMemAllocatorNotifyCallbackTemp_Vtbl, 0x92980b30_c1de_11d2_abf5_00a0c905f375); windows_core::imp::interface_hierarchy!(IMemAllocatorNotifyCallbackTemp, windows_core::IUnknown); @@ -13521,8 +13521,8 @@ impl IPin { pub unsafe fn EndFlush(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).EndFlush)(windows_core::Interface::as_raw(self)) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn NewSegment(&self, tstart: super::mediaobj::REFERENCE_TIME, tstop: super::mediaobj::REFERENCE_TIME, drate: f64) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn NewSegment(&self, tstart: super::ksmedia::REFERENCE_TIME, tstop: super::ksmedia::REFERENCE_TIME, drate: f64) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).NewSegment)(windows_core::Interface::as_raw(self), tstart, tstop, drate) } } } @@ -13547,12 +13547,12 @@ pub struct IPin_Vtbl { pub EndOfStream: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub BeginFlush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub EndFlush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, - #[cfg(feature = "mediaobj")] - pub NewSegment: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME, super::mediaobj::REFERENCE_TIME, f64) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub NewSegment: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME, super::ksmedia::REFERENCE_TIME, f64) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] NewSegment: usize, } -#[cfg(all(feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "ksmedia", feature = "objidl"))] pub trait IPin_Impl: windows_core::IUnknownImpl { fn Connect(&self, preceivepin: windows_core::Ref, pmt: *const AM_MEDIA_TYPE) -> windows_core::Result<()>; fn ReceiveConnection(&self, pconnector: windows_core::Ref, pmt: *const AM_MEDIA_TYPE) -> windows_core::Result<()>; @@ -13568,9 +13568,9 @@ pub trait IPin_Impl: windows_core::IUnknownImpl { fn EndOfStream(&self) -> windows_core::Result<()>; fn BeginFlush(&self) -> windows_core::Result<()>; fn EndFlush(&self) -> windows_core::Result<()>; - fn NewSegment(&self, tstart: super::mediaobj::REFERENCE_TIME, tstop: super::mediaobj::REFERENCE_TIME, drate: f64) -> windows_core::Result<()>; + fn NewSegment(&self, tstart: super::ksmedia::REFERENCE_TIME, tstop: super::ksmedia::REFERENCE_TIME, drate: f64) -> windows_core::Result<()>; } -#[cfg(all(feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "ksmedia", feature = "objidl"))] impl IPin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, preceivepin: *mut core::ffi::c_void, pmt: *const AM_MEDIA_TYPE) -> windows_core::HRESULT { @@ -13681,7 +13681,7 @@ impl IPin_Vtbl { IPin_Impl::EndFlush(this).into() } } - unsafe extern "system" fn NewSegment(this: *mut core::ffi::c_void, tstart: super::mediaobj::REFERENCE_TIME, tstop: super::mediaobj::REFERENCE_TIME, drate: f64) -> windows_core::HRESULT { + unsafe extern "system" fn NewSegment(this: *mut core::ffi::c_void, tstart: super::ksmedia::REFERENCE_TIME, tstop: super::ksmedia::REFERENCE_TIME, drate: f64) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IPin_Impl::NewSegment(this, core::mem::transmute_copy(&tstart), core::mem::transmute_copy(&tstop), core::mem::transmute_copy(&drate)).into() @@ -13710,7 +13710,7 @@ impl IPin_Vtbl { iid == &::IID } } -#[cfg(all(feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "ksmedia", feature = "objidl"))] impl windows_core::RuntimeName for IPin {} windows_core::imp::define_interface!(IPinConnection, IPinConnection_Vtbl, 0x4a9a62d3_27d4_403d_91e9_89f540e55534); windows_core::imp::interface_hierarchy!(IPinConnection, windows_core::IUnknown); @@ -13830,7 +13830,7 @@ impl windows_core::RuntimeName for IPinFlowControl {} windows_core::imp::define_interface!(IQualityControl, IQualityControl_Vtbl, 0x56a868a5_0ad4_11ce_b03a_0020af0ba770); windows_core::imp::interface_hierarchy!(IQualityControl, windows_core::IUnknown); impl IQualityControl { - #[cfg(all(feature = "mediaobj", feature = "objidl"))] + #[cfg(all(feature = "ksmedia", feature = "objidl"))] pub unsafe fn Notify(&self, pself: P0, q: Quality) -> windows_core::HRESULT where P0: windows_core::Param, @@ -13848,18 +13848,18 @@ impl IQualityControl { #[doc(hidden)] pub struct IQualityControl_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(all(feature = "mediaobj", feature = "objidl"))] + #[cfg(all(feature = "ksmedia", feature = "objidl"))] pub Notify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, Quality) -> windows_core::HRESULT, - #[cfg(not(all(feature = "mediaobj", feature = "objidl")))] + #[cfg(not(all(feature = "ksmedia", feature = "objidl")))] Notify: usize, pub SetSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } -#[cfg(all(feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "ksmedia", feature = "objidl"))] pub trait IQualityControl_Impl: windows_core::IUnknownImpl { fn Notify(&self, pself: windows_core::Ref, q: &Quality) -> windows_core::Result<()>; fn SetSink(&self, piqc: windows_core::Ref) -> windows_core::Result<()>; } -#[cfg(all(feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "ksmedia", feature = "objidl"))] impl IQualityControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, pself: *mut core::ffi::c_void, q: Quality) -> windows_core::HRESULT { @@ -13880,7 +13880,7 @@ impl IQualityControl_Vtbl { iid == &::IID } } -#[cfg(all(feature = "mediaobj", feature = "objidl"))] +#[cfg(all(feature = "ksmedia", feature = "objidl"))] impl windows_core::RuntimeName for IQualityControl {} #[cfg(feature = "dsound")] windows_core::imp::define_interface!(IReferenceClock2, IReferenceClock2_Vtbl, 0x36b73885_c2c8_11cf_8b46_00805f6cef60); @@ -13899,9 +13899,9 @@ windows_core::imp::interface_hierarchy!(IReferenceClock2, windows_core::IUnknown pub struct IReferenceClock2_Vtbl { pub base__: super::dsound::IReferenceClock_Vtbl, } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "winnt"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "winnt"))] pub trait IReferenceClock2_Impl: super::dsound::IReferenceClock_Impl {} -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "winnt"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "winnt"))] impl IReferenceClock2_Vtbl { pub const fn new() -> Self { Self { base__: super::dsound::IReferenceClock_Vtbl::new::() } @@ -13910,17 +13910,17 @@ impl IReferenceClock2_Vtbl { iid == &::IID || iid == &::IID } } -#[cfg(all(feature = "dsound", feature = "mediaobj", feature = "winnt"))] +#[cfg(all(feature = "dsound", feature = "ksmedia", feature = "winnt"))] impl windows_core::RuntimeName for IReferenceClock2 {} windows_core::imp::define_interface!(IReferenceClockTimerControl, IReferenceClockTimerControl_Vtbl, 0xebec459c_2eca_4d42_a8af_30df557614b8); windows_core::imp::interface_hierarchy!(IReferenceClockTimerControl, windows_core::IUnknown); impl IReferenceClockTimerControl { - #[cfg(feature = "mediaobj")] - pub unsafe fn SetDefaultTimerResolution(&self, timerresolution: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + #[cfg(feature = "ksmedia")] + pub unsafe fn SetDefaultTimerResolution(&self, timerresolution: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetDefaultTimerResolution)(windows_core::Interface::as_raw(self), timerresolution) } } - #[cfg(feature = "mediaobj")] - pub unsafe fn GetDefaultTimerResolution(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetDefaultTimerResolution(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDefaultTimerResolution)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) @@ -13931,30 +13931,30 @@ impl IReferenceClockTimerControl { #[doc(hidden)] pub struct IReferenceClockTimerControl_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(feature = "mediaobj")] - pub SetDefaultTimerResolution: unsafe extern "system" fn(*mut core::ffi::c_void, super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub SetDefaultTimerResolution: unsafe extern "system" fn(*mut core::ffi::c_void, super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] SetDefaultTimerResolution: usize, - #[cfg(feature = "mediaobj")] - pub GetDefaultTimerResolution: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetDefaultTimerResolution: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetDefaultTimerResolution: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IReferenceClockTimerControl_Impl: windows_core::IUnknownImpl { - fn SetDefaultTimerResolution(&self, timerresolution: super::mediaobj::REFERENCE_TIME) -> windows_core::Result<()>; - fn GetDefaultTimerResolution(&self) -> windows_core::Result; + fn SetDefaultTimerResolution(&self, timerresolution: super::ksmedia::REFERENCE_TIME) -> windows_core::Result<()>; + fn GetDefaultTimerResolution(&self) -> windows_core::Result; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IReferenceClockTimerControl_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn SetDefaultTimerResolution(this: *mut core::ffi::c_void, timerresolution: super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn SetDefaultTimerResolution(this: *mut core::ffi::c_void, timerresolution: super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IReferenceClockTimerControl_Impl::SetDefaultTimerResolution(this, core::mem::transmute_copy(&timerresolution)).into() } } - unsafe extern "system" fn GetDefaultTimerResolution(this: *mut core::ffi::c_void, ptimerresolution: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetDefaultTimerResolution(this: *mut core::ffi::c_void, ptimerresolution: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IReferenceClockTimerControl_Impl::GetDefaultTimerResolution(this) { @@ -13976,7 +13976,7 @@ impl IReferenceClockTimerControl_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IReferenceClockTimerControl {} windows_core::imp::define_interface!(IRegisterServiceProvider, IRegisterServiceProvider_Vtbl, 0x7b3a2f01_0751_48dd_b556_004785171c54); windows_core::imp::interface_hierarchy!(IRegisterServiceProvider, windows_core::IUnknown); @@ -14649,8 +14649,8 @@ impl IVMRImageCompositor { pub unsafe fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const AM_MEDIA_TYPE, ftexture: bool) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).SetStreamMediaType)(windows_core::Interface::as_raw(self), dwstrmid, pmt, ftexture.into()) } } - #[cfg(all(feature = "ddraw", feature = "mediaobj"))] - pub unsafe fn CompositeImage(&self, pd3ddevice: P0, pddsrendertarget: P1, pmtrendertarget: *const AM_MEDIA_TYPE, rtstart: super::mediaobj::REFERENCE_TIME, rtend: super::mediaobj::REFERENCE_TIME, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::HRESULT + #[cfg(all(feature = "ddraw", feature = "ksmedia"))] + pub unsafe fn CompositeImage(&self, pd3ddevice: P0, pddsrendertarget: P1, pmtrendertarget: *const AM_MEDIA_TYPE, rtstart: super::ksmedia::REFERENCE_TIME, rtend: super::ksmedia::REFERENCE_TIME, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::HRESULT where P0: windows_core::Param, P1: windows_core::Param, @@ -14671,19 +14671,19 @@ pub struct IVMRImageCompositor_Vtbl { #[cfg(not(feature = "ddraw"))] TermCompositionTarget: usize, pub SetStreamMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const AM_MEDIA_TYPE, windows_core::BOOL) -> windows_core::HRESULT, - #[cfg(all(feature = "ddraw", feature = "mediaobj"))] - pub CompositeImage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const AM_MEDIA_TYPE, super::mediaobj::REFERENCE_TIME, super::mediaobj::REFERENCE_TIME, u32, *const VMRVIDEOSTREAMINFO, u32) -> windows_core::HRESULT, - #[cfg(not(all(feature = "ddraw", feature = "mediaobj")))] + #[cfg(all(feature = "ddraw", feature = "ksmedia"))] + pub CompositeImage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const AM_MEDIA_TYPE, super::ksmedia::REFERENCE_TIME, super::ksmedia::REFERENCE_TIME, u32, *const VMRVIDEOSTREAMINFO, u32) -> windows_core::HRESULT, + #[cfg(not(all(feature = "ddraw", feature = "ksmedia")))] CompositeImage: usize, } -#[cfg(all(feature = "ddraw", feature = "mediaobj"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia"))] pub trait IVMRImageCompositor_Impl: windows_core::IUnknownImpl { fn InitCompositionTarget(&self, pd3ddevice: windows_core::Ref, pddsrendertarget: windows_core::Ref) -> windows_core::Result<()>; fn TermCompositionTarget(&self, pd3ddevice: windows_core::Ref, pddsrendertarget: windows_core::Ref) -> windows_core::Result<()>; fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const AM_MEDIA_TYPE, ftexture: windows_core::BOOL) -> windows_core::Result<()>; - fn CompositeImage(&self, pd3ddevice: windows_core::Ref, pddsrendertarget: windows_core::Ref, pmtrendertarget: *const AM_MEDIA_TYPE, rtstart: super::mediaobj::REFERENCE_TIME, rtend: super::mediaobj::REFERENCE_TIME, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::Result<()>; + fn CompositeImage(&self, pd3ddevice: windows_core::Ref, pddsrendertarget: windows_core::Ref, pmtrendertarget: *const AM_MEDIA_TYPE, rtstart: super::ksmedia::REFERENCE_TIME, rtend: super::ksmedia::REFERENCE_TIME, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::Result<()>; } -#[cfg(all(feature = "ddraw", feature = "mediaobj"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia"))] impl IVMRImageCompositor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitCompositionTarget(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void) -> windows_core::HRESULT { @@ -14704,7 +14704,7 @@ impl IVMRImageCompositor_Vtbl { IVMRImageCompositor_Impl::SetStreamMediaType(this, core::mem::transmute_copy(&dwstrmid), core::mem::transmute_copy(&pmt), core::mem::transmute_copy(&ftexture)).into() } } - unsafe extern "system" fn CompositeImage(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void, pmtrendertarget: *const AM_MEDIA_TYPE, rtstart: super::mediaobj::REFERENCE_TIME, rtend: super::mediaobj::REFERENCE_TIME, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::HRESULT { + unsafe extern "system" fn CompositeImage(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void, pmtrendertarget: *const AM_MEDIA_TYPE, rtstart: super::ksmedia::REFERENCE_TIME, rtend: super::ksmedia::REFERENCE_TIME, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVMRImageCompositor_Impl::CompositeImage(this, core::mem::transmute_copy(&pd3ddevice), core::mem::transmute_copy(&pddsrendertarget), core::mem::transmute_copy(&pmtrendertarget), core::mem::transmute_copy(&rtstart), core::mem::transmute_copy(&rtend), core::mem::transmute_copy(&dwclrbkgnd), core::mem::transmute_copy(&pvideostreaminfo), core::mem::transmute_copy(&cstreams)).into() @@ -14722,7 +14722,7 @@ impl IVMRImageCompositor_Vtbl { iid == &::IID } } -#[cfg(all(feature = "ddraw", feature = "mediaobj"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia"))] impl windows_core::RuntimeName for IVMRImageCompositor {} windows_core::imp::define_interface!(IVMRImagePresenter, IVMRImagePresenter_Vtbl, 0xce704fe7_e71e_41fb_baa2_c4403e1182f5); windows_core::imp::interface_hierarchy!(IVMRImagePresenter, windows_core::IUnknown); @@ -14733,7 +14733,7 @@ impl IVMRImagePresenter { pub unsafe fn StopPresenting(&self, dwuserid: usize) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).StopPresenting)(windows_core::Interface::as_raw(self), dwuserid) } } - #[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] + #[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] pub unsafe fn PresentImage(&self, dwuserid: usize, lppresinfo: *const VMRPRESENTATIONINFO) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).PresentImage)(windows_core::Interface::as_raw(self), dwuserid, lppresinfo) } } @@ -14744,18 +14744,18 @@ pub struct IVMRImagePresenter_Vtbl { pub base__: windows_core::IUnknown_Vtbl, pub StartPresenting: unsafe extern "system" fn(*mut core::ffi::c_void, usize) -> windows_core::HRESULT, pub StopPresenting: unsafe extern "system" fn(*mut core::ffi::c_void, usize) -> windows_core::HRESULT, - #[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] + #[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] pub PresentImage: unsafe extern "system" fn(*mut core::ffi::c_void, usize, *const VMRPRESENTATIONINFO) -> windows_core::HRESULT, - #[cfg(not(all(feature = "ddraw", feature = "mediaobj", feature = "windef")))] + #[cfg(not(all(feature = "ddraw", feature = "ksmedia", feature = "windef")))] PresentImage: usize, } -#[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] pub trait IVMRImagePresenter_Impl: windows_core::IUnknownImpl { fn StartPresenting(&self, dwuserid: usize) -> windows_core::Result<()>; fn StopPresenting(&self, dwuserid: usize) -> windows_core::Result<()>; fn PresentImage(&self, dwuserid: usize, lppresinfo: *const VMRPRESENTATIONINFO) -> windows_core::Result<()>; } -#[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] impl IVMRImagePresenter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartPresenting(this: *mut core::ffi::c_void, dwuserid: usize) -> windows_core::HRESULT { @@ -14787,7 +14787,7 @@ impl IVMRImagePresenter_Vtbl { iid == &::IID } } -#[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] impl windows_core::RuntimeName for IVMRImagePresenter {} windows_core::imp::define_interface!(IVMRImagePresenterConfig, IVMRImagePresenterConfig_Vtbl, 0x9f3a1c85_8555_49ba_935f_be5b5b29d178); windows_core::imp::interface_hierarchy!(IVMRImagePresenterConfig, windows_core::IUnknown); @@ -16173,13 +16173,13 @@ pub const PhysConn_Video_VideoEncoder: PhysicalConnectorType = 13; pub const PhysConn_Video_YRYBY: PhysicalConnectorType = 5; pub type PhysicalConnectorType = i32; #[repr(C)] -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct Quality { pub Type: QualityMessageType, pub Proportion: i32, - pub Late: super::mediaobj::REFERENCE_TIME, - pub TimeStamp: super::mediaobj::REFERENCE_TIME, + pub Late: super::ksmedia::REFERENCE_TIME, + pub TimeStamp: super::ksmedia::REFERENCE_TIME, } pub type QualityMessageType = i32; #[repr(C)] @@ -16458,13 +16458,13 @@ pub const VMRMode_Renderless: VMRMode = 4; pub const VMRMode_Windowed: VMRMode = 1; pub const VMRMode_Windowless: VMRMode = 2; #[repr(C)] -#[cfg(all(feature = "ddraw", feature = "mediaobj", feature = "windef"))] +#[cfg(all(feature = "ddraw", feature = "ksmedia", feature = "windef"))] #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct VMRPRESENTATIONINFO { pub dwFlags: u32, pub lpSurf: core::mem::ManuallyDrop>, - pub rtStart: super::mediaobj::REFERENCE_TIME, - pub rtEnd: super::mediaobj::REFERENCE_TIME, + pub rtStart: super::ksmedia::REFERENCE_TIME, + pub rtEnd: super::ksmedia::REFERENCE_TIME, pub szAspectRatio: super::windef::SIZE, pub rcSrc: super::windef::RECT, pub rcDst: super::windef::RECT, diff --git a/crates/libs/windows/src/Windows/wmcodecdsp/mod.rs b/crates/libs/windows/src/Windows/wmcodecdsp/mod.rs index 66d066cd54..c4dc4c75e7 100644 --- a/crates/libs/windows/src/Windows/wmcodecdsp/mod.rs +++ b/crates/libs/windows/src/Windows/wmcodecdsp/mod.rs @@ -1287,8 +1287,8 @@ impl windows_core::RuntimeName for IWMCodecLeakyBucket {} windows_core::imp::define_interface!(IWMCodecOutputTimestamp, IWMCodecOutputTimestamp_Vtbl, 0xb72adf95_7adc_4a72_bc05_577d8ea6bf68); windows_core::imp::interface_hierarchy!(IWMCodecOutputTimestamp, windows_core::IUnknown); impl IWMCodecOutputTimestamp { - #[cfg(feature = "mediaobj")] - pub unsafe fn GetNextOutputTime(&self) -> windows_core::Result { + #[cfg(feature = "ksmedia")] + pub unsafe fn GetNextOutputTime(&self) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextOutputTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) @@ -1299,19 +1299,19 @@ impl IWMCodecOutputTimestamp { #[doc(hidden)] pub struct IWMCodecOutputTimestamp_Vtbl { pub base__: windows_core::IUnknown_Vtbl, - #[cfg(feature = "mediaobj")] - pub GetNextOutputTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT, - #[cfg(not(feature = "mediaobj"))] + #[cfg(feature = "ksmedia")] + pub GetNextOutputTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT, + #[cfg(not(feature = "ksmedia"))] GetNextOutputTime: usize, } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] pub trait IWMCodecOutputTimestamp_Impl: windows_core::IUnknownImpl { - fn GetNextOutputTime(&self) -> windows_core::Result; + fn GetNextOutputTime(&self) -> windows_core::Result; } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl IWMCodecOutputTimestamp_Vtbl { pub const fn new() -> Self { - unsafe extern "system" fn GetNextOutputTime(this: *mut core::ffi::c_void, prttime: *mut super::mediaobj::REFERENCE_TIME) -> windows_core::HRESULT { + unsafe extern "system" fn GetNextOutputTime(this: *mut core::ffi::c_void, prttime: *mut super::ksmedia::REFERENCE_TIME) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IWMCodecOutputTimestamp_Impl::GetNextOutputTime(this) { @@ -1329,7 +1329,7 @@ impl IWMCodecOutputTimestamp_Vtbl { iid == &::IID } } -#[cfg(feature = "mediaobj")] +#[cfg(feature = "ksmedia")] impl windows_core::RuntimeName for IWMCodecOutputTimestamp {} windows_core::imp::define_interface!(IWMCodecPrivateData, IWMCodecPrivateData_Vtbl, 0x73f0be8e_57f7_4f01_aa66_9f57340cfe0e); windows_core::imp::interface_hierarchy!(IWMCodecPrivateData, windows_core::IUnknown); diff --git a/crates/tools/win32/src/main.rs b/crates/tools/win32/src/main.rs index 6f2c820e5c..1c9814d242 100644 --- a/crates/tools/win32/src/main.rs +++ b/crates/tools/win32/src/main.rs @@ -458,6 +458,7 @@ const SATELLITE_HEADERS: &[&str] = &[ "batclass.h", "hidclass.h", "winternl.h", + "endpointvolume.h", ]; /// Import libraries (resolved against the pinned Windows SDK x64 lib tree) read to recover the diff --git a/metadata/win32/devicetopology.rdl b/metadata/win32/devicetopology.rdl new file mode 100644 index 0000000000..37b4b766af --- /dev/null +++ b/metadata/win32/devicetopology.rdl @@ -0,0 +1,173 @@ +#[win32] +mod Windows { + mod Win32 { + #[repr(i32)] + enum ConnectorType { + Unknown_Connector = 0, + Physical_Internal = 1, + Physical_External = 2, + Software_IO = 3, + Software_Fixed = 4, + Network = 5, + } + const DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT: u32 = 1685217608; + #[repr(i32)] + enum DataFlow { + In = 0, + Out = 1, + } + const DeviceTopology: GUID = 0x1df639d0_5ec1_47aa_9379_828dc1aa8c59; + const EVENTCONTEXT_VOLUMESLIDER: GUID = 0xe2c2e9de_09b1_4b04_84e5_07931225ee04; + #[guid(0x85401fd4_6de4_4b9d_9869_2d6753a82f3c)] + interface IAudioAutoGainControl: IUnknown { + fn GetEnabled(&self, pbEnabled: *mut BOOL) -> HRESULT; + fn SetEnabled(&self, bEnable: BOOL, #[opt] pguidEventContext: *const GUID) -> HRESULT; + } + #[guid(0xa2b1a1d9_4db3_425d_a2b2_bd335cb3e2e5)] + interface IAudioBass: IPerChannelDbLevel {} + #[guid(0xbb11c46f_ec28_493c_b88a_5db88062ce98)] + interface IAudioChannelConfig: IUnknown { + fn SetChannelConfig(&self, dwConfig: u32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + fn GetChannelConfig(&self, #[retval] pdwConfig: *mut u32) -> HRESULT; + } + #[guid(0x4f03dc02_5e6e_4653_8f72_a030c123d598)] + interface IAudioInputSelector: IUnknown { + fn GetSelection(&self, pnIdSelected: *mut u32) -> HRESULT; + fn SetSelection(&self, nIdSelect: u32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + } + #[guid(0x7d8b1437_dd53_4350_9c1b_1ee2890bd938)] + interface IAudioLoudness: IUnknown { + fn GetEnabled(&self, pbEnabled: *mut BOOL) -> HRESULT; + fn SetEnabled(&self, bEnable: BOOL, #[opt] pguidEventContext: *const GUID) -> HRESULT; + } + #[guid(0x5e54b6d7_b44b_40d9_9a9e_e691d9ce6edf)] + interface IAudioMidrange: IPerChannelDbLevel {} + #[guid(0xdf45aeea_b74a_4b6b_afad_2366b6aa012e)] + interface IAudioMute: IUnknown { + fn SetMute(&self, bMuted: BOOL, #[opt] pguidEventContext: *const GUID) -> HRESULT; + fn GetMute(&self, pbMuted: *mut BOOL) -> HRESULT; + } + #[guid(0xbb515f69_94a7_429e_8b9c_271b3f11a3ab)] + interface IAudioOutputSelector: IUnknown { + fn GetSelection(&self, pnIdSelected: *mut u32) -> HRESULT; + fn SetSelection(&self, nIdSelect: u32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + } + #[guid(0xdd79923c_0599_45e0_b8b6_c8df7db6e796)] + interface IAudioPeakMeter: IUnknown { + fn GetChannelCount(&self, pcChannels: *mut u32) -> HRESULT; + fn GetLevel(&self, nChannel: u32, pfLevel: *mut f32) -> HRESULT; + } + #[guid(0x0a717812_694e_4907_b74b_bafa5cfdca7b)] + interface IAudioTreble: IPerChannelDbLevel {} + #[guid(0x7fb7b48f_531d_44a2_bcb3_5ad5a134b3dc)] + interface IAudioVolumeLevel: IPerChannelDbLevel {} + #[guid(0x9c2c4058_23f5_41de_877a_df3af236a09e)] + interface IConnector: IUnknown { + fn GetType(&self, pType: *mut ConnectorType) -> HRESULT; + fn GetDataFlow(&self, pFlow: *mut DataFlow) -> HRESULT; + fn ConnectTo(&self, pConnectTo: IConnector) -> HRESULT; + fn Disconnect(&self) -> HRESULT; + fn IsConnected(&self, pbConnected: *mut BOOL) -> HRESULT; + fn GetConnectedTo(&self, ppConTo: *mut IConnector) -> HRESULT; + fn GetConnectorIdConnectedTo(&self, ppwstrConnectorId: *mut PWSTR) -> HRESULT; + fn GetDeviceIdConnectedTo(&self, ppwstrDeviceId: *mut PWSTR) -> HRESULT; + } + #[guid(0xa09513ed_c709_4d21_bd7b_5f34c47f3947)] + interface IControlChangeNotify: IUnknown { + fn OnNotify(&self, dwSenderProcessId: u32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + } + #[guid(0x45d37c3f_5140_444a_ae24_400789f3cbf3)] + interface IControlInterface: IUnknown { + fn GetName(&self, ppwstrName: *mut PWSTR) -> HRESULT; + fn GetIID(&self, pIID: *mut GUID) -> HRESULT; + } + #[guid(0x3b22bcbf_2586_4af0_8583_205d391b807c)] + interface IDeviceSpecificProperty: IUnknown { + fn GetType(&self, pVType: *mut VARTYPE) -> HRESULT; + fn GetValue(&self, pvValue: *mut void, #[in] #[out] pcbValue: *mut u32) -> HRESULT; + fn SetValue(&self, pvValue: *const void, cbValue: u32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + fn Get4BRange(&self, plMin: *mut i32, plMax: *mut i32, plStepping: *mut i32) -> HRESULT; + } + #[guid(0x2a07407e_6497_4a18_9787_32f79bd0d98f)] + interface IDeviceTopology: IUnknown { + fn GetConnectorCount(&self, pCount: *mut u32) -> HRESULT; + fn GetConnector(&self, nIndex: u32, ppConnector: *mut IConnector) -> HRESULT; + fn GetSubunitCount(&self, pCount: *mut u32) -> HRESULT; + fn GetSubunit(&self, nIndex: u32, ppSubunit: *mut ISubunit) -> HRESULT; + fn GetPartById(&self, nId: u32, ppPart: *mut IPart) -> HRESULT; + fn GetDeviceId(&self, ppwstrDeviceId: *mut PWSTR) -> HRESULT; + fn GetSignalPath(&self, pIPartFrom: IPart, pIPartTo: IPart, bRejectMixedPaths: BOOL, ppParts: *mut IPartsList) -> HRESULT; + } + #[guid(0x28f54685_06fd_11d2_b27a_00a0c9223196)] + interface IKsControl: IUnknown { + fn KsProperty(&self, Property: *const KSIDENTIFIER, PropertyLength: u32, #[in] #[out] PropertyData: *mut void, DataLength: u32, BytesReturned: *mut u32) -> HRESULT; + fn KsMethod(&self, Method: *const KSIDENTIFIER, MethodLength: u32, #[in] #[out] MethodData: *mut void, DataLength: u32, BytesReturned: *mut u32) -> HRESULT; + fn KsEvent(&self, Event: *const KSIDENTIFIER, EventLength: u32, #[in] #[out] EventData: *mut void, DataLength: u32, BytesReturned: *mut u32) -> HRESULT; + } + #[guid(0x3cb4a69d_bb6f_4d2b_95b7_452d2c155db5)] + interface IKsFormatSupport: IUnknown { + fn IsFormatSupported(&self, pKsFormat: *const KSDATARANGE, cbFormat: u32, pbSupported: *mut BOOL) -> HRESULT; + fn GetDevicePreferredFormat(&self, ppKsFormat: *mut PKSDATAFORMAT) -> HRESULT; + } + #[guid(0xc99af463_d629_4ec4_8c00_e54d68154248)] + interface IKsJackContainerId: IUnknown { + fn GetJackContainerId(&self, pJackContainerId: *mut GUID) -> HRESULT; + } + #[guid(0x4509f757_2d46_4637_8e62_ce7db944f57b)] + interface IKsJackDescription: IUnknown { + fn GetJackCount(&self, pcJacks: *mut u32) -> HRESULT; + fn GetJackDescription(&self, nJack: u32, pDescription: *mut KSJACK_DESCRIPTION) -> HRESULT; + } + #[guid(0x478f3a9b_e0c9_4827_9228_6f5505ffe76a)] + interface IKsJackDescription2: IUnknown { + fn GetJackCount(&self, pcJacks: *mut u32) -> HRESULT; + fn GetJackDescription2(&self, nJack: u32, pDescription2: *mut KSJACK_DESCRIPTION2) -> HRESULT; + } + #[guid(0xe3f6778b_6660_4cc8_a291_ecc4192d9967)] + interface IKsJackDescription3: IUnknown { + fn GetJackCount(&self, pcJacks: *mut u32) -> HRESULT; + fn GetJackDescription3(&self, nJack: u32, pDescription3: *mut KSJACK_DESCRIPTION3) -> HRESULT; + } + #[guid(0xd9bd72ed_290f_4581_9ff3_61027a8fe532)] + interface IKsJackSinkInformation: IUnknown { + fn GetJackSinkInformation(&self, pJackSinkInformation: *mut KSJACK_SINK_INFORMATION) -> HRESULT; + } + #[guid(0xae2de0e4_5bca_4f2d_aa46_5d13f8fdb3a9)] + interface IPart: IUnknown { + fn GetName(&self, ppwstrName: *mut PWSTR) -> HRESULT; + fn GetLocalId(&self, pnId: *mut u32) -> HRESULT; + fn GetGlobalId(&self, ppwstrGlobalId: *mut PWSTR) -> HRESULT; + fn GetPartType(&self, pPartType: *mut PartType) -> HRESULT; + fn GetSubType(&self, pSubType: *mut GUID) -> HRESULT; + fn GetControlInterfaceCount(&self, pCount: *mut u32) -> HRESULT; + fn GetControlInterface(&self, nIndex: u32, ppInterfaceDesc: *mut IControlInterface) -> HRESULT; + fn EnumPartsIncoming(&self, ppParts: *mut IPartsList) -> HRESULT; + fn EnumPartsOutgoing(&self, ppParts: *mut IPartsList) -> HRESULT; + fn GetTopologyObject(&self, ppTopology: *mut IDeviceTopology) -> HRESULT; + fn Activate(&self, dwClsContext: u32, refiid: *const GUID, #[opt] ppvObject: *mut *mut void) -> HRESULT; + fn RegisterControlChangeCallback(&self, riid: *const GUID, pNotify: IControlChangeNotify) -> HRESULT; + fn UnregisterControlChangeCallback(&self, pNotify: IControlChangeNotify) -> HRESULT; + } + #[guid(0x6daa848c_5eb0_45cc_aea5_998a2cda1ffb)] + interface IPartsList: IUnknown { + fn GetCount(&self, pCount: *mut u32) -> HRESULT; + fn GetPart(&self, nIndex: u32, ppPart: *mut IPart) -> HRESULT; + } + #[guid(0xc2f8e001_f205_4bc9_99bc_c13b1e048ccb)] + interface IPerChannelDbLevel: IUnknown { + fn GetChannelCount(&self, pcChannels: *mut u32) -> HRESULT; + fn GetLevelRange(&self, nChannel: u32, pfMinLevelDB: *mut f32, pfMaxLevelDB: *mut f32, pfStepping: *mut f32) -> HRESULT; + fn GetLevel(&self, nChannel: u32, pfLevelDB: *mut f32) -> HRESULT; + fn SetLevel(&self, nChannel: u32, fLevelDB: f32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + fn SetLevelUniform(&self, fLevelDB: f32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + fn SetLevelAllChannels(&self, #[len_param(1)] aLevelsDB: *const f32, cChannels: u32, #[opt] pguidEventContext: *const GUID) -> HRESULT; + } + #[guid(0x82149a85_dba6_4487_86bb_ea8f7fefcc71)] + interface ISubunit: IUnknown {} + #[repr(i32)] + enum PartType { + Connector = 0, + Subunit = 1, + } + } +} diff --git a/metadata/win32/endpointvolume.rdl b/metadata/win32/endpointvolume.rdl new file mode 100644 index 0000000000..1b8fdf15c0 --- /dev/null +++ b/metadata/win32/endpointvolume.rdl @@ -0,0 +1,52 @@ +#[win32] +mod Windows { + mod Win32 { + struct AUDIO_VOLUME_NOTIFICATION_DATA { + guidEventContext: GUID, + bMuted: BOOL, + fMasterVolume: f32, + nChannels: u32, + afChannelVolumes: [f32; 1], + } + const ENDPOINT_HARDWARE_SUPPORT_METER: u32 = 4; + const ENDPOINT_HARDWARE_SUPPORT_MUTE: u32 = 2; + const ENDPOINT_HARDWARE_SUPPORT_VOLUME: u32 = 1; + #[guid(0x5cdf2c82_841e_4546_9722_0cf74078229a)] + interface IAudioEndpointVolume: IUnknown { + fn RegisterControlChangeNotify(&self, pNotify: IAudioEndpointVolumeCallback) -> HRESULT; + fn UnregisterControlChangeNotify(&self, pNotify: IAudioEndpointVolumeCallback) -> HRESULT; + fn GetChannelCount(&self, pnChannelCount: *mut u32) -> HRESULT; + fn SetMasterVolumeLevel(&self, fLevelDB: f32, pguidEventContext: *const GUID) -> HRESULT; + fn SetMasterVolumeLevelScalar(&self, fLevel: f32, pguidEventContext: *const GUID) -> HRESULT; + fn GetMasterVolumeLevel(&self, pfLevelDB: *mut f32) -> HRESULT; + fn GetMasterVolumeLevelScalar(&self, pfLevel: *mut f32) -> HRESULT; + fn SetChannelVolumeLevel(&self, nChannel: u32, fLevelDB: f32, pguidEventContext: *const GUID) -> HRESULT; + fn SetChannelVolumeLevelScalar(&self, nChannel: u32, fLevel: f32, pguidEventContext: *const GUID) -> HRESULT; + fn GetChannelVolumeLevel(&self, nChannel: u32, pfLevelDB: *mut f32) -> HRESULT; + fn GetChannelVolumeLevelScalar(&self, nChannel: u32, pfLevel: *mut f32) -> HRESULT; + fn SetMute(&self, bMute: BOOL, pguidEventContext: *const GUID) -> HRESULT; + fn GetMute(&self, pbMute: *mut BOOL) -> HRESULT; + fn GetVolumeStepInfo(&self, pnStep: *mut u32, pnStepCount: *mut u32) -> HRESULT; + fn VolumeStepUp(&self, pguidEventContext: *const GUID) -> HRESULT; + fn VolumeStepDown(&self, pguidEventContext: *const GUID) -> HRESULT; + fn QueryHardwareSupport(&self, pdwHardwareSupportMask: *mut u32) -> HRESULT; + fn GetVolumeRange(&self, pflVolumeMindB: *mut f32, pflVolumeMaxdB: *mut f32, pflVolumeIncrementdB: *mut f32) -> HRESULT; + } + #[guid(0x657804fa_d6ad_4496_8a60_352752af4f89)] + interface IAudioEndpointVolumeCallback: IUnknown { + fn OnNotify(&self, pNotify: *mut AUDIO_VOLUME_NOTIFICATION_DATA) -> HRESULT; + } + #[guid(0x66e11784_f695_4f28_a505_a7080081a78f)] + interface IAudioEndpointVolumeEx: IAudioEndpointVolume { + fn GetVolumeRangeChannel(&self, iChannel: u32, pflVolumeMindB: *mut f32, pflVolumeMaxdB: *mut f32, pflVolumeIncrementdB: *mut f32) -> HRESULT; + } + #[guid(0xc02216f6_8c67_4b5b_9d00_d008e73e0064)] + interface IAudioMeterInformation: IUnknown { + fn GetPeakValue(&self, pfPeak: *mut f32) -> HRESULT; + fn GetMeteringChannelCount(&self, pnChannelCount: *mut u32) -> HRESULT; + fn GetChannelsPeakValues(&self, u32ChannelCount: u32, afPeakValues: *mut f32) -> HRESULT; + fn QueryHardwareSupport(&self, pdwHardwareSupportMask: *mut u32) -> HRESULT; + } + type PAUDIO_VOLUME_NOTIFICATION_DATA = *mut AUDIO_VOLUME_NOTIFICATION_DATA; + } +} diff --git a/metadata/win32/ksmedia.rdl b/metadata/win32/ksmedia.rdl index 6cc7729ca6..eafdf7f246 100644 --- a/metadata/win32/ksmedia.rdl +++ b/metadata/win32/ksmedia.rdl @@ -1136,6 +1136,7 @@ mod Windows { struct KSDATAFORMAT_SUBTYPE_NABTS {} struct KSDATAFORMAT_SUBTYPE_NABTS_FEC {} struct KSDATAFORMAT_SUBTYPE_OVERLAY {} + struct KSDATAFORMAT_SUBTYPE_PCM {} struct KSDATAFORMAT_SUBTYPE_RAW8 {} struct KSDATAFORMAT_SUBTYPE_RIFF {} struct KSDATAFORMAT_SUBTYPE_RIFFMIDI {} @@ -1151,6 +1152,7 @@ mod Windows { struct KSDATAFORMAT_SUBTYPE_UNIVERSALMIDIPACKET {} struct KSDATAFORMAT_SUBTYPE_VPVBI {} struct KSDATAFORMAT_SUBTYPE_VPVideo {} + struct KSDATAFORMAT_SUBTYPE_WAVEFORMATEX {} struct KSDATAFORMAT_SUBTYPE_WMAUDIO2 {} struct KSDATAFORMAT_SUBTYPE_WMAUDIO3 {} struct KSDATAFORMAT_SUBTYPE_WMAUDIO_LOSSLESS {} @@ -4014,10 +4016,12 @@ mod Windows { type PVIDEOFORMAT_DX12 = *mut VIDEOFORMAT_DX12; type PVRAM_SURFACE_INFO = *mut VRAM_SURFACE_INFO; type PVRAM_SURFACE_INFO_PROPERTY_S = *mut VRAM_SURFACE_INFO_PROPERTY_S; + type PWAVEFORMATEXTENSIBLE = *mut WAVEFORMATEXTENSIBLE; type PWAVEFORMATEXTENSIBLE_IEC61937 = *mut WAVEFORMATEXTENSIBLE_IEC61937; type PWNF_KSCAMERA_STREAMSTATE_INFO = *mut WNF_KSCAMERA_STREAMSTATE_INFO; type PWST_BUFFER = *mut WST_BUFFER; type PWST_BUFFER_LINE = *mut WST_BUFFER_LINE; + type REFERENCE_TIME = i64; struct SECURE_BUFFER_INFO { guidBufferIdentifier: GUID, cbBufferSize: u32, @@ -4028,6 +4032,26 @@ mod Windows { Size: u32, PatternType: GUID, } + const SPEAKER_ALL: u32 = 2147483648; + const SPEAKER_BACK_CENTER: u32 = 256; + const SPEAKER_BACK_LEFT: u32 = 16; + const SPEAKER_BACK_RIGHT: u32 = 32; + const SPEAKER_FRONT_CENTER: u32 = 4; + const SPEAKER_FRONT_LEFT: u32 = 1; + const SPEAKER_FRONT_LEFT_OF_CENTER: u32 = 64; + const SPEAKER_FRONT_RIGHT: u32 = 2; + const SPEAKER_FRONT_RIGHT_OF_CENTER: u32 = 128; + const SPEAKER_LOW_FREQUENCY: u32 = 8; + const SPEAKER_RESERVED: u32 = 2147221504; + const SPEAKER_SIDE_LEFT: u32 = 512; + const SPEAKER_SIDE_RIGHT: u32 = 1024; + const SPEAKER_TOP_BACK_CENTER: u32 = 65536; + const SPEAKER_TOP_BACK_LEFT: u32 = 32768; + const SPEAKER_TOP_BACK_RIGHT: u32 = 131072; + const SPEAKER_TOP_CENTER: u32 = 2048; + const SPEAKER_TOP_FRONT_CENTER: u32 = 8192; + const SPEAKER_TOP_FRONT_LEFT: u32 = 4096; + const SPEAKER_TOP_FRONT_RIGHT: u32 = 16384; #[repr(i32)] enum TELEPHONY_CALLCONTROLOP { TELEPHONY_CALLCONTROLOP_DISABLE = 0, @@ -4240,12 +4264,24 @@ mod Windows { pVramSurfaceInfo: PVRAM_SURFACE_INFO, } #[packed(1)] + struct WAVEFORMATEXTENSIBLE { + Format: WAVEFORMATEX, + Samples: #[packed(1)] union { + wValidBitsPerSample: u16, + wSamplesPerBlock: u16, + wReserved: u16, + }, + dwChannelMask: u32, + SubFormat: GUID, + } + #[packed(1)] struct WAVEFORMATEXTENSIBLE_IEC61937 { FormatExt: WAVEFORMATEXTENSIBLE, dwEncodedSamplesPerSec: u32, dwEncodedChannelCount: u32, dwAverageBytesPerSec: u32, } + const WAVE_FORMAT_EXTENSIBLE: u32 = 65534; struct WNF_KSCAMERA_STREAMSTATE_INFO { ProcessId: u32, SessionId: u32, diff --git a/metadata/win32/mediaobj.rdl b/metadata/win32/mediaobj.rdl index 09fba957a6..a633ba0cad 100644 --- a/metadata/win32/mediaobj.rdl +++ b/metadata/win32/mediaobj.rdl @@ -75,7 +75,6 @@ mod Windows { fn GetLatency(&self, pLatencyTime: *mut REFERENCE_TIME) -> HRESULT; } type PDMO_OUTPUT_DATA_BUFFER = *mut DMO_OUTPUT_DATA_BUFFER; - type REFERENCE_TIME = i64; #[repr(i32)] enum _DMO_INPLACE_PROCESS_FLAGS { DMO_INPLACE_NORMAL = 0, diff --git a/metadata/win32/mmreg.rdl b/metadata/win32/mmreg.rdl index 26a4ef2929..23b4c06951 100644 --- a/metadata/win32/mmreg.rdl +++ b/metadata/win32/mmreg.rdl @@ -238,8 +238,6 @@ mod Windows { const JPEG_Y: u32 = 1; const JPEG_YCbCr: u32 = 2; struct KSDATAFORMAT_SUBTYPE_IEEE_FLOAT {} - struct KSDATAFORMAT_SUBTYPE_PCM {} - struct KSDATAFORMAT_SUBTYPE_WAVEFORMATEX {} type LPADPCMCOEFSET = *mut ADPCMCOEFSET; type LPADPCMEWAVEFORMAT = *mut ADPCMEWAVEFORMAT; type LPADPCMWAVEFORMAT = *mut ADPCMWAVEFORMAT; @@ -1961,7 +1959,6 @@ mod Windows { type PTRUESPEECHWAVEFORMAT = *mut TRUESPEECHWAVEFORMAT; type PVOLUMEWAVEFILTER = *mut VOLUMEWAVEFILTER; type PWAVEFILTER = *mut WAVEFILTER; - type PWAVEFORMATEXTENSIBLE = *mut WAVEFORMATEXTENSIBLE; type PWAVEFORMATIEEEFLOATEX = *mut WAVEFORMATIEEEFLOATEX; type PWAVEFORMATPCMEX = *mut WAVEFORMATPCMEX; type PYAMAHA_ADPCMWAVEFORMAT = *mut YAMAHA_ADPCMWAVEFORMAT; @@ -2030,26 +2027,6 @@ mod Windows { wfx: WAVEFORMATEX, wCompType: u16, } - const SPEAKER_ALL: u32 = 2147483648; - const SPEAKER_BACK_CENTER: u32 = 256; - const SPEAKER_BACK_LEFT: u32 = 16; - const SPEAKER_BACK_RIGHT: u32 = 32; - const SPEAKER_FRONT_CENTER: u32 = 4; - const SPEAKER_FRONT_LEFT: u32 = 1; - const SPEAKER_FRONT_LEFT_OF_CENTER: u32 = 64; - const SPEAKER_FRONT_RIGHT: u32 = 2; - const SPEAKER_FRONT_RIGHT_OF_CENTER: u32 = 128; - const SPEAKER_LOW_FREQUENCY: u32 = 8; - const SPEAKER_RESERVED: u32 = 2147221504; - const SPEAKER_SIDE_LEFT: u32 = 512; - const SPEAKER_SIDE_RIGHT: u32 = 1024; - const SPEAKER_TOP_BACK_CENTER: u32 = 65536; - const SPEAKER_TOP_BACK_LEFT: u32 = 32768; - const SPEAKER_TOP_BACK_RIGHT: u32 = 131072; - const SPEAKER_TOP_CENTER: u32 = 2048; - const SPEAKER_TOP_FRONT_CENTER: u32 = 8192; - const SPEAKER_TOP_FRONT_LEFT: u32 = 4096; - const SPEAKER_TOP_FRONT_RIGHT: u32 = 16384; #[packed(1)] struct TRUESPEECHWAVEFORMAT { wfx: WAVEFORMATEX, @@ -2069,17 +2046,6 @@ mod Windows { fdwFilter: u32, dwReserved: [u32; 5], } - #[packed(1)] - struct WAVEFORMATEXTENSIBLE { - Format: WAVEFORMATEX, - Samples: #[packed(1)] union { - wValidBitsPerSample: u16, - wSamplesPerBlock: u16, - wReserved: u16, - }, - dwChannelMask: u32, - SubFormat: GUID, - } type WAVEFORMATIEEEFLOATEX = WAVEFORMATEXTENSIBLE; type WAVEFORMATPCMEX = WAVEFORMATEXTENSIBLE; const WAVE_FILTER_DEVELOPMENT: u32 = 65535; @@ -2145,7 +2111,6 @@ mod Windows { const WAVE_FORMAT_ENCORE_G726: u32 = 41223; const WAVE_FORMAT_ESPCM: u32 = 97; const WAVE_FORMAT_ESST_AC3: u32 = 577; - const WAVE_FORMAT_EXTENSIBLE: u32 = 65534; const WAVE_FORMAT_FAAD_AAC: u32 = 28781; const WAVE_FORMAT_FLAC: u32 = 61868; const WAVE_FORMAT_FM_TOWNS_SND: u32 = 768; diff --git a/web/features/index.html b/web/features/index.html index 6c3a81b9a7..bfdea03393 100644 --- a/web/features/index.html +++ b/web/features/index.html @@ -24,7 +24,7 @@

windows-rs feature search

Loading index…
APIFeature
- +