gtk4paintablesink: Also create window for gst-play

So it can be easily tested with
```
gst-play-1.0 --videosink=gtk4paintablesink ...
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1555>
This commit is contained in:
Robert Mader 2024-04-29 22:17:46 +02:00
parent 47b788d44b
commit 4326c3bfce

View file

@ -297,6 +297,7 @@ impl ElementImpl for PaintableSink {
match transition { match transition {
gst::StateChange::NullToReady => { gst::StateChange::NullToReady => {
let create_window = glib::program_name().as_deref() == Some("gst-launch-1.0") let create_window = glib::program_name().as_deref() == Some("gst-launch-1.0")
|| glib::program_name().as_deref() == Some("gst-play-1.0")
|| std::env::var("GST_GTK4_WINDOW").as_deref() == Ok("1"); || std::env::var("GST_GTK4_WINDOW").as_deref() == Ok("1");
if create_window { if create_window {