gstreamer-rs/examples/Cargo.toml

210 lines
4.7 KiB
TOML
Raw Permalink Normal View History

[package]
name = "examples"
version.workspace = true
license = "MIT"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
edition.workspace = true
rust-version.workspace = true
[dependencies]
glib.workspace = true
gst.workspace = true
gst-gl = { workspace = true, optional = true }
gst-gl-egl = { workspace = true, optional = true }
gst-gl-x11 = { workspace = true, optional = true }
gst-app.workspace = true
gst-audio.workspace = true
gst-base.workspace = true
gst-video.workspace = true
gst-pbutils.workspace = true
gst-play = { workspace = true, optional = true }
gst-player = { workspace = true, optional = true }
ges = { workspace = true, optional = true }
gst-sdp = { workspace = true, optional = true }
gst-rtsp = { workspace = true, optional = true }
gst-rtsp-server = { workspace = true, optional = true }
gst-allocators = { workspace = true, optional = true }
gio = { workspace = true, optional = true }
anyhow = "1.0"
byte-slice-cast = "1"
cairo-rs = { workspace = true, features=["use_glib"], optional = true }
examples/glupload: Upgrade to `glutin 0.31` Glutin completely detached from `winit` in the `0.30` upgrade, concerning itself exclusively with OpenGL and WSI APIs around it and leaving any windowing system interop to the `raw-window-handle` crate specifically designed for this purpose. This untanglement massively cleans up and simplifies the `glutin` codebase, and expands on surfaceless rendering as well as drawing to simple views (textures) on the screen as is common on Android, without having control over the entire "window" and event loop. Some winit boilerplate is however still provided as part of the `glutin-winit` crate. Most of the `glutin`+`winit` flow in this `glupload` example is adopted from `glutin`'s example, following platform-specific initialization sequences that heavily clutter the code (only creating a window upfront on Windows, only forcing transparency on macOS, and trying various fallback attributes to create a context). At the same time `winit`'s `Event::Resumed` and `Event::Suspended` event strategy is adopted: this event was previously for Android and iOS exclusively - where window handles come and go at the merit of the OS, rather than existing for the lifetime of the application - but is now emitted on all platforms for consistency. A `Surface` (via `RawWindowHandle`) is only available and usable after `Event::Resumed`, where we can create a GL surface and "current" the context on that surface for rendering. This is where the `GstPipeline` will be set to `Playing` so that data starts flowing. The inverse should happen in `Event::Suspended` where the `Surface` has to be given up again after un-currenting, before giving control back to the OS to free the rest of the resources. This will however be implemented when Android is brought online for these examples. Finally, now that the `gst-gl-egl` and `gst-gl-x11` features turn on the relevant features in `glutin` and `winit`, it is now possible to easily test `x11` on Wayland (over XWayland) without even unsetting `WAYLAND_DISPLAY`, by simply compiling the whole stack without EGL/ Wayland support (on the previous example `winit` would always default to a Wayland handle, while `glupload` could only create `GstGLDisplayX11`). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
2023-10-27 17:03:22 +00:00
derive_more = "0.99.5"
futures = "0.3"
glutin = { version = "0.31", optional = true, default-features = false }
glutin-winit = { version = "0.4", optional = true, default-features = false }
image = { version = "0.24", optional = true, default-features = false, features = ["png", "jpeg"] }
2022-06-06 08:18:40 +00:00
memfd = { version = "0.6", optional = true }
examples/glupload: Upgrade to `glutin 0.31` Glutin completely detached from `winit` in the `0.30` upgrade, concerning itself exclusively with OpenGL and WSI APIs around it and leaving any windowing system interop to the `raw-window-handle` crate specifically designed for this purpose. This untanglement massively cleans up and simplifies the `glutin` codebase, and expands on surfaceless rendering as well as drawing to simple views (textures) on the screen as is common on Android, without having control over the entire "window" and event loop. Some winit boilerplate is however still provided as part of the `glutin-winit` crate. Most of the `glutin`+`winit` flow in this `glupload` example is adopted from `glutin`'s example, following platform-specific initialization sequences that heavily clutter the code (only creating a window upfront on Windows, only forcing transparency on macOS, and trying various fallback attributes to create a context). At the same time `winit`'s `Event::Resumed` and `Event::Suspended` event strategy is adopted: this event was previously for Android and iOS exclusively - where window handles come and go at the merit of the OS, rather than existing for the lifetime of the application - but is now emitted on all platforms for consistency. A `Surface` (via `RawWindowHandle`) is only available and usable after `Event::Resumed`, where we can create a GL surface and "current" the context on that surface for rendering. This is where the `GstPipeline` will be set to `Playing` so that data starts flowing. The inverse should happen in `Event::Suspended` where the `Surface` has to be given up again after un-currenting, before giving control back to the OS to free the rest of the resources. This will however be implemented when Android is brought online for these examples. Finally, now that the `gst-gl-egl` and `gst-gl-x11` features turn on the relevant features in `glutin` and `winit`, it is now possible to easily test `x11` on Wayland (over XWayland) without even unsetting `WAYLAND_DISPLAY`, by simply compiling the whole stack without EGL/ Wayland support (on the previous example `winit` would always default to a Wayland handle, while `glupload` could only create `GstGLDisplayX11`). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
2023-10-27 17:03:22 +00:00
memmap2 = { version = "0.9", optional = true }
pango = { workspace = true, optional = true }
pangocairo = { workspace = true, optional = true }
examples/glupload: Upgrade to `glutin 0.31` Glutin completely detached from `winit` in the `0.30` upgrade, concerning itself exclusively with OpenGL and WSI APIs around it and leaving any windowing system interop to the `raw-window-handle` crate specifically designed for this purpose. This untanglement massively cleans up and simplifies the `glutin` codebase, and expands on surfaceless rendering as well as drawing to simple views (textures) on the screen as is common on Android, without having control over the entire "window" and event loop. Some winit boilerplate is however still provided as part of the `glutin-winit` crate. Most of the `glutin`+`winit` flow in this `glupload` example is adopted from `glutin`'s example, following platform-specific initialization sequences that heavily clutter the code (only creating a window upfront on Windows, only forcing transparency on macOS, and trying various fallback attributes to create a context). At the same time `winit`'s `Event::Resumed` and `Event::Suspended` event strategy is adopted: this event was previously for Android and iOS exclusively - where window handles come and go at the merit of the OS, rather than existing for the lifetime of the application - but is now emitted on all platforms for consistency. A `Surface` (via `RawWindowHandle`) is only available and usable after `Event::Resumed`, where we can create a GL surface and "current" the context on that surface for rendering. This is where the `GstPipeline` will be set to `Playing` so that data starts flowing. The inverse should happen in `Event::Suspended` where the `Surface` has to be given up again after un-currenting, before giving control back to the OS to free the rest of the resources. This will however be implemented when Android is brought online for these examples. Finally, now that the `gst-gl-egl` and `gst-gl-x11` features turn on the relevant features in `glutin` and `winit`, it is now possible to easily test `x11` on Wayland (over XWayland) without even unsetting `WAYLAND_DISPLAY`, by simply compiling the whole stack without EGL/ Wayland support (on the previous example `winit` would always default to a Wayland handle, while `glupload` could only create `GstGLDisplayX11`). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
2023-10-27 17:03:22 +00:00
raw-window-handle = { version = "0.5", optional = true }
uds = { version = "0.4", optional = true }
examples/glupload: Upgrade to `glutin 0.31` Glutin completely detached from `winit` in the `0.30` upgrade, concerning itself exclusively with OpenGL and WSI APIs around it and leaving any windowing system interop to the `raw-window-handle` crate specifically designed for this purpose. This untanglement massively cleans up and simplifies the `glutin` codebase, and expands on surfaceless rendering as well as drawing to simple views (textures) on the screen as is common on Android, without having control over the entire "window" and event loop. Some winit boilerplate is however still provided as part of the `glutin-winit` crate. Most of the `glutin`+`winit` flow in this `glupload` example is adopted from `glutin`'s example, following platform-specific initialization sequences that heavily clutter the code (only creating a window upfront on Windows, only forcing transparency on macOS, and trying various fallback attributes to create a context). At the same time `winit`'s `Event::Resumed` and `Event::Suspended` event strategy is adopted: this event was previously for Android and iOS exclusively - where window handles come and go at the merit of the OS, rather than existing for the lifetime of the application - but is now emitted on all platforms for consistency. A `Surface` (via `RawWindowHandle`) is only available and usable after `Event::Resumed`, where we can create a GL surface and "current" the context on that surface for rendering. This is where the `GstPipeline` will be set to `Playing` so that data starts flowing. The inverse should happen in `Event::Suspended` where the `Surface` has to be given up again after un-currenting, before giving control back to the OS to free the rest of the resources. This will however be implemented when Android is brought online for these examples. Finally, now that the `gst-gl-egl` and `gst-gl-x11` features turn on the relevant features in `glutin` and `winit`, it is now possible to easily test `x11` on Wayland (over XWayland) without even unsetting `WAYLAND_DISPLAY`, by simply compiling the whole stack without EGL/ Wayland support (on the previous example `winit` would always default to a Wayland handle, while `glupload` could only create `GstGLDisplayX11`). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
2023-10-27 17:03:22 +00:00
winit = { version = "0.29", optional = true, default-features = false, features = ["rwh_05"] }
atomic_refcell = "0.1"
data-encoding = "2.0"
once_cell = "1"
2018-10-18 10:25:14 +00:00
[target.'cfg(windows)'.dependencies]
windows = { version = "0.56", 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",
"Win32_Graphics_Imaging", "Win32_System_Com", "Foundation_Numerics"], optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.25"
objc = "0.2.7"
2018-10-18 10:25:14 +00:00
[build-dependencies]
gl_generator = { version = "0.14", optional = true }
[features]
default = []
rtsp-server = ["gst-rtsp-server", "gst-rtsp", "gst-sdp"]
2020-11-22 10:55:32 +00:00
rtsp-server-record = ["gst-rtsp-server", "gst-rtsp", "gio"]
2018-08-28 08:06:01 +00:00
pango-cairo = ["pango", "pangocairo", "cairo-rs"]
2020-11-22 10:55:32 +00:00
overlay-composition = ["pango", "pangocairo", "cairo-rs"]
examples/glupload: Upgrade to `glutin 0.31` Glutin completely detached from `winit` in the `0.30` upgrade, concerning itself exclusively with OpenGL and WSI APIs around it and leaving any windowing system interop to the `raw-window-handle` crate specifically designed for this purpose. This untanglement massively cleans up and simplifies the `glutin` codebase, and expands on surfaceless rendering as well as drawing to simple views (textures) on the screen as is common on Android, without having control over the entire "window" and event loop. Some winit boilerplate is however still provided as part of the `glutin-winit` crate. Most of the `glutin`+`winit` flow in this `glupload` example is adopted from `glutin`'s example, following platform-specific initialization sequences that heavily clutter the code (only creating a window upfront on Windows, only forcing transparency on macOS, and trying various fallback attributes to create a context). At the same time `winit`'s `Event::Resumed` and `Event::Suspended` event strategy is adopted: this event was previously for Android and iOS exclusively - where window handles come and go at the merit of the OS, rather than existing for the lifetime of the application - but is now emitted on all platforms for consistency. A `Surface` (via `RawWindowHandle`) is only available and usable after `Event::Resumed`, where we can create a GL surface and "current" the context on that surface for rendering. This is where the `GstPipeline` will be set to `Playing` so that data starts flowing. The inverse should happen in `Event::Suspended` where the `Surface` has to be given up again after un-currenting, before giving control back to the OS to free the rest of the resources. This will however be implemented when Android is brought online for these examples. Finally, now that the `gst-gl-egl` and `gst-gl-x11` features turn on the relevant features in `glutin` and `winit`, it is now possible to easily test `x11` on Wayland (over XWayland) without even unsetting `WAYLAND_DISPLAY`, by simply compiling the whole stack without EGL/ Wayland support (on the previous example `winit` would always default to a Wayland handle, while `glupload` could only create `GstGLDisplayX11`). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
2023-10-27 17:03:22 +00:00
gl = ["dep:gst-gl", "dep:gl_generator", "dep:glutin", "dep:glutin-winit", "dep:winit", "dep:raw-window-handle"]
gst-gl-x11 = ["dep:gst-gl-x11", "glutin-winit?/glx"] # glx turns on x11
gst-gl-egl = ["dep:gst-gl-egl", "glutin-winit?/egl", "glutin-winit?/x11", "glutin-winit?/wayland"] # Use X11 or Wayland via EGL
allocators = ["gst-allocators", "memmap2", "memfd", "uds"]
2017-08-15 07:29:06 +00:00
[[bin]]
name = "appsink"
[[bin]]
name = "appsrc"
[[bin]]
name = "custom_events"
[[bin]]
name = "custom_meta"
[[bin]]
name = "decodebin"
[[bin]]
name = "debug_ringbuffer"
[[bin]]
name = "encodebin"
[[bin]]
name = "events"
[[bin]]
name = "iterator"
[[bin]]
name = "launch_glib_main"
[[bin]]
name = "launch"
[[bin]]
name = "transmux"
[[bin]]
name = "pad_probes"
2022-05-15 22:48:58 +00:00
[[bin]]
name = "play"
required-features = ["gst-play"]
[[bin]]
name = "playbin"
[[bin]]
name = "player"
required-features = ["gst-player"]
[[bin]]
name = "queries"
[[bin]]
name = "rtpfecclient"
[[bin]]
name = "rtpfecserver"
[[bin]]
name = "rtsp-server"
required-features = ["rtsp-server"]
[[bin]]
name = "rtsp-server-subclass"
required-features = ["rtsp-server"]
[[bin]]
name = "rtsp-server-custom-auth"
required-features = ["rtsp-server", "gst-rtsp-server/v1_22"]
[[bin]]
name = "tagsetter"
[[bin]]
name = "toc"
[[bin]]
name = "futures"
[[bin]]
name = "glib-futures"
[[bin]]
name = "rtsp-server-record"
required-features = ["rtsp-server-record"]
[[bin]]
name = "discoverer"
2018-08-28 08:06:01 +00:00
[[bin]]
name = "pango-cairo"
required-features = ["pango-cairo"]
[[bin]]
name = "overlay-composition"
required-features = ["overlay-composition"]
[[bin]]
name = "overlay-composition-d2d"
required-features = ["windows"]
[[bin]]
name = "ges"
required-features = ["ges"]
2018-10-18 10:25:14 +00:00
[[bin]]
name = "glwindow"
2018-10-18 10:25:14 +00:00
required-features = ["gl"]
[[bin]]
name = "glfilter"
required-features = ["gl"]
[[bin]]
name = "subclass"
[[bin]]
name = "video_converter"
[[bin]]
name = "thumbnail"
required-features = ["image"]
[[bin]]
name = "fd_allocator"
required-features = ["allocators"]
[[bin]]
name = "cairo_compositor"
required-features = ["cairo-rs", "gst-video/v1_18"]
[[bin]]
name = "d3d11videosink"
required-features = ["windows"]
[[bin]]
name = "audio_multichannel_interleave"