1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#![allow(non_camel_case_types, non_snake_case)]
use crate::decl::*;
use crate::mf::vts::*;
use crate::ole::privs::*;
use crate::prelude::*;
com_interface! { IMFStreamDescriptor: "56c03d9c-9dbb-45f5-ab4b-d80f47c05938";
/// [`IMFStreamDescriptor`](https://learn.microsoft.com/en-us/windows/win32/api/mfidl/nn-mfidl-imfstreamdescriptor)
/// COM interface.
///
/// Automatically calls
/// [`Release`](https://learn.microsoft.com/en-us/windows/win32/api/unknwn/nf-unknwn-iunknown-release)
/// when the object goes out of scope.
}
impl mf_IMFAttributes for IMFStreamDescriptor {}
impl mf_IMFStreamDescriptor for IMFStreamDescriptor {}
/// This trait is enabled with the `mf` feature, and provides methods for
/// [`IMFStreamDescriptor`](crate::IMFStreamDescriptor).
///
/// Prefer importing this trait through the prelude:
///
/// ```no_run
/// use winsafe::prelude::*;
/// ```
pub trait mf_IMFStreamDescriptor: mf_IMFAttributes {
fn_com_interface_get! { GetMediaTypeHandler: IMFStreamDescriptorVT => IMFMediaTypeHandler;
/// [`IMFStreamDescriptor::GetMediaTypeHandler`](https://learn.microsoft.com/en-us/windows/win32/api/mfidl/nf-mfidl-imfstreamdescriptor-getmediatypehandler)
/// method.
}
/// [`IMFStreamDescriptor::GetStreamIdentifier`](https://learn.microsoft.com/en-us/windows/win32/api/mfidl/nf-mfidl-imfstreamdescriptor-getstreamidentifier)
/// method.
#[must_use]
fn GetStreamIdentifier(&self) -> HrResult<u32> {
let mut id = 0u32;
HrRet(unsafe {
(vt::<IMFStreamDescriptorVT>(self).GetStreamIdentifier)(self.ptr(), &mut id)
}).to_hrresult()
.map(|_| id)
}
}