2017-07-03 15:08:43 +00:00
|
|
|
[package]
|
|
|
|
name = "examples"
|
2023-08-08 16:47:55 +00:00
|
|
|
version = "0.22.0"
|
2019-10-22 13:36:32 +00:00
|
|
|
license = "MIT"
|
2017-07-03 15:08:43 +00:00
|
|
|
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
2021-10-30 11:31:45 +00:00
|
|
|
edition = "2021"
|
2023-07-19 06:24:10 +00:00
|
|
|
rust-version = "1.70"
|
2017-07-03 15:08:43 +00:00
|
|
|
|
|
|
|
[dependencies]
|
2021-05-12 13:10:16 +00:00
|
|
|
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
2020-10-10 08:10:20 +00:00
|
|
|
gst = { package = "gstreamer", path = "../gstreamer" }
|
|
|
|
gst-gl = { package = "gstreamer-gl", path = "../gstreamer-gl", optional = true }
|
2020-11-26 22:46:15 +00:00
|
|
|
gst-gl-egl = { package = "gstreamer-gl-egl", path = "../gstreamer-gl/egl", optional = true }
|
|
|
|
gst-gl-x11 = { package = "gstreamer-gl-x11", path = "../gstreamer-gl/x11", optional = true }
|
2020-10-10 08:10:20 +00:00
|
|
|
gst-app = { package = "gstreamer-app", path = "../gstreamer-app" }
|
|
|
|
gst-audio = { package = "gstreamer-audio", path = "../gstreamer-audio" }
|
|
|
|
gst-base = { package = "gstreamer-base", path = "../gstreamer-base" }
|
|
|
|
gst-video = { package = "gstreamer-video", path = "../gstreamer-video" }
|
|
|
|
gst-pbutils = { package = "gstreamer-pbutils", path = "../gstreamer-pbutils" }
|
2022-05-15 22:48:58 +00:00
|
|
|
gst-play = { package = "gstreamer-play", path = "../gstreamer-play", optional = true }
|
2020-10-10 08:10:20 +00:00
|
|
|
gst-player = { package = "gstreamer-player", path = "../gstreamer-player", optional = true }
|
|
|
|
ges = { package = "gstreamer-editing-services", path = "../gstreamer-editing-services", optional = true }
|
|
|
|
gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp", optional = true }
|
|
|
|
gst-rtsp = { package = "gstreamer-rtsp", path = "../gstreamer-rtsp", optional = true }
|
|
|
|
gst-rtsp-server = { package = "gstreamer-rtsp-server", path = "../gstreamer-rtsp-server", optional = true }
|
2022-03-01 19:19:50 +00:00
|
|
|
gst-allocators = { package = "gstreamer-allocators", path = "../gstreamer-allocators", optional = true }
|
|
|
|
gio = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true }
|
2020-05-02 23:23:38 +00:00
|
|
|
anyhow = "1.0"
|
2020-10-13 09:28:19 +00:00
|
|
|
byte-slice-cast = "1"
|
2022-03-01 19:19:50 +00:00
|
|
|
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", 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 }
|
2023-06-26 11:14:45 +00:00
|
|
|
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 = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true }
|
|
|
|
pangocairo = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true }
|
|
|
|
raw-window-handle = { version = "0.5", optional = true }
|
2023-08-16 09:35:19 +00:00
|
|
|
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"] }
|
2018-10-18 10:25:14 +00:00
|
|
|
|
2022-08-24 17:44:59 +00:00
|
|
|
[target.'cfg(windows)'.dependencies]
|
2023-11-17 08:58:40 +00:00
|
|
|
windows = { version = "0.52", features=["Win32_Graphics_Direct3D11",
|
2022-08-24 17:44:59 +00:00
|
|
|
"Win32_Foundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Dxgi",
|
|
|
|
"Win32_Graphics_Dxgi_Common", "Win32_Graphics_Direct2D",
|
|
|
|
"Win32_Graphics_Direct2D_Common", "Win32_Graphics_DirectWrite",
|
2023-01-26 17:11:37 +00:00
|
|
|
"Win32_Graphics_Imaging", "Win32_System_Com", "Foundation_Numerics"], optional = true }
|
2022-08-24 17:44:59 +00:00
|
|
|
|
2021-07-12 10:13:34 +00:00
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
2023-06-26 11:00:54 +00:00
|
|
|
cocoa = "0.25"
|
2021-07-12 10:13:34 +00:00
|
|
|
|
2018-10-18 10:25:14 +00:00
|
|
|
[build-dependencies]
|
2019-10-04 09:09:57 +00:00
|
|
|
gl_generator = { version = "0.14", optional = true }
|
2017-08-07 14:35:57 +00:00
|
|
|
|
|
|
|
[features]
|
2019-01-16 15:06:24 +00:00
|
|
|
default = []
|
2020-10-10 08:10:20 +00:00
|
|
|
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
|
2022-03-01 19:19:50 +00:00
|
|
|
allocators = ["gst-allocators", "memmap2", "memfd", "uds"]
|
2017-08-15 07:29:06 +00:00
|
|
|
|
2018-02-26 16:47:08 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "appsink"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "appsrc"
|
|
|
|
|
2020-05-27 12:41:02 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "custom_events"
|
|
|
|
|
2020-06-04 09:07:05 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "custom_meta"
|
|
|
|
|
2018-02-26 16:47:08 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "decodebin"
|
|
|
|
|
2020-08-19 13:15:36 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "debug_ringbuffer"
|
|
|
|
|
2018-04-23 04:24:18 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "encodebin"
|
|
|
|
|
2018-02-26 16:47:08 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "events"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "iterator"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "launch_glib_main"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "launch"
|
|
|
|
|
2018-11-05 11:50:10 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "transmux"
|
|
|
|
|
2018-02-26 16:47:08 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "pad_probes"
|
|
|
|
|
2022-05-15 22:48:58 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "play"
|
|
|
|
required-features = ["gst-play"]
|
|
|
|
|
2018-02-26 16:47:08 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "playbin"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "player"
|
|
|
|
required-features = ["gst-player"]
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "queries"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "rtpfecclient"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "rtpfecserver"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "rtsp-server"
|
2020-10-10 08:10:20 +00:00
|
|
|
required-features = ["rtsp-server"]
|
2018-02-26 16:47:08 +00:00
|
|
|
|
2020-02-23 08:26:28 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "rtsp-server-subclass"
|
2020-10-10 08:10:20 +00:00
|
|
|
required-features = ["rtsp-server"]
|
2020-02-23 08:26:28 +00:00
|
|
|
|
2018-02-26 16:47:08 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "tagsetter"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "toc"
|
|
|
|
|
|
|
|
[[bin]]
|
2018-04-23 17:27:51 +00:00
|
|
|
name = "futures"
|
2018-02-23 02:33:37 +00:00
|
|
|
|
2018-04-23 17:31:27 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "glib-futures"
|
|
|
|
|
2018-02-23 02:33:37 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "rtsp-server-record"
|
2020-10-10 08:10:20 +00:00
|
|
|
required-features = ["rtsp-server-record"]
|
2018-08-18 07:10:53 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "discoverer"
|
2018-08-28 08:06:01 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "pango-cairo"
|
|
|
|
required-features = ["pango-cairo"]
|
2018-10-31 16:10:30 +00:00
|
|
|
|
2020-05-28 04:37:23 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "overlay-composition"
|
|
|
|
required-features = ["overlay-composition"]
|
|
|
|
|
2023-01-26 17:11:37 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "overlay-composition-d2d"
|
|
|
|
required-features = ["windows"]
|
|
|
|
|
2018-10-31 16:10:30 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "ges"
|
|
|
|
required-features = ["ges"]
|
2018-10-18 10:25:14 +00:00
|
|
|
|
|
|
|
[[bin]]
|
2021-04-16 09:17:29 +00:00
|
|
|
name = "glwindow"
|
2018-10-18 10:25:14 +00:00
|
|
|
required-features = ["gl"]
|
2019-10-30 15:07:23 +00:00
|
|
|
|
2021-04-16 18:47:42 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "glfilter"
|
|
|
|
required-features = ["gl"]
|
|
|
|
|
2019-10-30 15:07:23 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "subclass"
|
2020-05-27 18:47:42 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "video_converter"
|
2020-08-02 21:21:21 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "thumbnail"
|
|
|
|
required-features = ["image"]
|
2022-03-01 19:19:50 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "fd_allocator"
|
2022-03-22 16:59:51 +00:00
|
|
|
required-features = ["allocators"]
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "cairo_compositor"
|
|
|
|
required-features = ["cairo-rs", "gst-video/v1_18"]
|
2022-08-24 17:44:59 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "d3d11videosink"
|
|
|
|
required-features = ["windows"]
|