mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 09:43:48 +00:00
gtk4: Update and adapt to texture builder API changes
See https://github.com/gtk-rs/gtk4-rs/pull/2046 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2247>
This commit is contained in:
parent
c29841dc1e
commit
7db44376db
2 changed files with 26 additions and 23 deletions
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -2242,7 +2242,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"cairo-rs",
|
||||
"gdk-pixbuf",
|
||||
|
@ -2256,7 +2256,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-sys"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"cairo-sys-rs",
|
||||
"gdk-pixbuf-sys",
|
||||
|
@ -2272,7 +2272,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-wayland"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"gdk4",
|
||||
"gdk4-wayland-sys",
|
||||
|
@ -2284,7 +2284,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-wayland-sys"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"glib-sys",
|
||||
"libc",
|
||||
|
@ -2294,7 +2294,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-win32"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"gdk4",
|
||||
"gdk4-win32-sys",
|
||||
|
@ -2307,7 +2307,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-win32-sys"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"gdk4-sys",
|
||||
"glib-sys",
|
||||
|
@ -2318,7 +2318,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-x11"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"gdk4",
|
||||
"gdk4-x11-sys",
|
||||
|
@ -2330,7 +2330,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gdk4-x11-sys"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"gdk4-sys",
|
||||
"glib-sys",
|
||||
|
@ -2540,7 +2540,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gsk4"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"cairo-rs",
|
||||
"gdk4",
|
||||
|
@ -2554,7 +2554,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gsk4-sys"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"cairo-sys-rs",
|
||||
"gdk4-sys",
|
||||
|
@ -4005,7 +4005,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gtk4"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"cairo-rs",
|
||||
"field-offset",
|
||||
|
@ -4025,7 +4025,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gtk4-macros"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
|
@ -4036,7 +4036,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gtk4-sys"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#496ea9f1d483d448898d2a3f16eb31fb477518cf"
|
||||
source = "git+https://github.com/gtk-rs/gtk4-rs?branch=main#7525aa6764377ce394cb2838c600571d0bed1aa5"
|
||||
dependencies = [
|
||||
"cairo-sys-rs",
|
||||
"gdk-pixbuf-sys",
|
||||
|
|
|
@ -402,17 +402,20 @@ fn video_frame_to_dmabuf_texture(
|
|||
return Ok((texture.clone(), pixel_aspect_ratio));
|
||||
}
|
||||
|
||||
let builder = gdk::DmabufTextureBuilder::new();
|
||||
builder.set_display(&gdk::Display::default().unwrap());
|
||||
builder.set_fourcc(info.fourcc());
|
||||
builder.set_modifier(info.modifier());
|
||||
builder.set_width(width);
|
||||
builder.set_height(height);
|
||||
builder.set_n_planes(n_planes);
|
||||
let mut builder = gdk::DmabufTextureBuilder::new()
|
||||
.set_display(&gdk::Display::default().unwrap())
|
||||
.set_fourcc(info.fourcc())
|
||||
.set_modifier(info.modifier())
|
||||
.set_width(width)
|
||||
.set_height(height)
|
||||
.set_n_planes(n_planes);
|
||||
for plane in 0..(n_planes as usize) {
|
||||
builder.set_fd(plane as u32, fds[plane]);
|
||||
builder.set_offset(plane as u32, offsets[plane] as u32);
|
||||
builder.set_stride(plane as u32, strides[plane] as u32);
|
||||
unsafe {
|
||||
builder = builder.set_fd(plane as u32, fds[plane]);
|
||||
}
|
||||
builder = builder
|
||||
.set_offset(plane as u32, offsets[plane] as u32)
|
||||
.set_stride(plane as u32, strides[plane] as u32);
|
||||
}
|
||||
|
||||
let texture = unsafe {
|
||||
|
|
Loading…
Reference in a new issue