mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
examples: d3d11videosink: Update for windows crate v0.44
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1197>
This commit is contained in:
parent
d5e24b9fbd
commit
8ef4420257
2 changed files with 4 additions and 7 deletions
|
@ -43,7 +43,7 @@ memfd = { version = "0.6", optional = true }
|
|||
uds = { version = "0.2", optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.43", features=["Win32_Graphics_Direct3D11",
|
||||
windows = { version = "0.44", features=["Win32_Graphics_Direct3D11",
|
||||
"Win32_Foundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Dxgi",
|
||||
"Win32_Graphics_Dxgi_Common", "Win32_Graphics_Direct2D",
|
||||
"Win32_Graphics_Direct2D_Common", "Win32_Graphics_DirectWrite",
|
||||
|
|
|
@ -134,11 +134,7 @@ fn main() -> Result<()> {
|
|||
// something in wrong way or driver bug or so.
|
||||
unsafe {
|
||||
let rtv = ID3D11RenderTargetView::from_raw_borrowed(&rtv_raw);
|
||||
let resource = {
|
||||
let mut resource = None;
|
||||
rtv.GetResource(&mut resource);
|
||||
resource.unwrap()
|
||||
};
|
||||
let resource = rtv.GetResource().unwrap();
|
||||
|
||||
let texture = resource.cast::<ID3D11Texture2D>().unwrap();
|
||||
let desc = {
|
||||
|
@ -195,7 +191,8 @@ fn main() -> Result<()> {
|
|||
let mut was_decreased = false;
|
||||
|
||||
loop {
|
||||
let metrics = layout.GetMetrics().unwrap();
|
||||
let mut metrics = DWRITE_TEXT_METRICS::default();
|
||||
layout.GetMetrics(&mut metrics).unwrap();
|
||||
layout
|
||||
.GetFontSize2(0, &mut font_size, Some(&mut range))
|
||||
.unwrap();
|
||||
|
|
Loading…
Reference in a new issue