examples: Update to windows 0.51

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1305>
This commit is contained in:
Sebastian Dröge 2023-08-16 12:35:27 +03:00 committed by Seungha Yang
parent 13835a9f03
commit 4976e4ac4b
2 changed files with 4 additions and 4 deletions

View file

@ -40,7 +40,7 @@ memfd = { version = "0.6", optional = true }
uds = { version = "0.4", optional = true } uds = { version = "0.4", optional = true }
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
windows = { version = "0.48", features=["Win32_Graphics_Direct3D11", windows = { version = "0.51", features=["Win32_Graphics_Direct3D11",
"Win32_Foundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Dxgi", "Win32_Foundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common", "Win32_Graphics_Direct2D", "Win32_Graphics_Dxgi_Common", "Win32_Graphics_Direct2D",
"Win32_Graphics_Direct2D_Common", "Win32_Graphics_DirectWrite", "Win32_Graphics_Direct2D_Common", "Win32_Graphics_DirectWrite",

View file

@ -92,18 +92,18 @@ fn create_pipeline() -> Result<gst::Pipeline, Error> {
DWriteCreateFactory::<IDWriteFactory>(DWRITE_FACTORY_TYPE_SHARED).unwrap(); DWriteCreateFactory::<IDWriteFactory>(DWRITE_FACTORY_TYPE_SHARED).unwrap();
let text_format = dwrite_factory let text_format = dwrite_factory
.CreateTextFormat( .CreateTextFormat(
windows::w!("Arial"), windows::core::w!("Arial"),
None, None,
DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STRETCH_NORMAL,
32f32, 32f32,
windows::w!("en-us"), windows::core::w!("en-us"),
) )
.unwrap(); .unwrap();
let text_layout = dwrite_factory let text_layout = dwrite_factory
.CreateTextLayout( .CreateTextLayout(
windows::w!("GStreamer").as_wide(), windows::core::w!("GStreamer").as_wide(),
&text_format, &text_format,
// Size will be updated later on "caps-changed" signal // Size will be updated later on "caps-changed" signal
800f32, 800f32,