Commit graph

3 commits

Author SHA1 Message Date
Guillaume Desmottes a649e7dead gstreamer: move parse_* functions to their own module
Better namespacing so the API is more Rust-y.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1355>
2023-12-04 16:15:51 +01:00
Sebastian Dröge 62f58620b7 gstreamer: Add accessors for PadProbeDatas on PadProbeInfo
And make use of it in examples and other code.

This allows to simplify usage a bit in most cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1324>
2023-10-16 11:28:18 +03:00
Ruben Gonzalez 0b922b0e89 examples: zoom effect with compositor and navigations events
Use can change the video player zoom using the next keys:

  * +: Zoom in
  * -: Zoom out
  * Up/Down/Right/Left: Move the frame
  * r: reset the zoom

Also mouse navigation events can be used for a better UX.

Furthermore, it works with an pipeline using other video compositor
filters like glvideomixer. For instance:

  glvideomixer \
    name=mix background=1 \
    sink_0::xpos=0 sink_0::ypos=0 sink_0::zorder=0 \
    sink_0::width={WIDTH} sink_0::height={HEIGHT} \
  ! glimagesinkelement \
  gltestsrc pattern=mandelbrot name=src \
  ! video/x-raw(memory:GLMemory),framerate=30/1,width={WIDTH},height={HEIGHT},pixel-aspect-ratio=1/1 \
  ! queue \
  ! mix.sink_0

Probe was added in the sink pad to get direct navigation events w/o
transformation done by the mixer. More info about it in the PR [1].

[1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1495

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1217>
2023-02-22 20:41:06 +01:00