Skip to content
Permalink
Browse files

GStreamer plugin should use GLMemory

  • Loading branch information
asajeffrey committed Nov 26, 2019
1 parent bb00a83 commit 06a10c5b650077a9dd83c34a0947cfd7edaa698e
Showing with 297 additions and 252 deletions.
  1. +1 −0 Cargo.lock
  2. +2 −1 ports/gstplugin/Cargo.toml
  3. +11 −10 ports/gstplugin/README.md
  4. +283 −241 ports/gstplugin/servosrc.rs

Some generated files are not rendered by default. Learn more.

@@ -21,7 +21,8 @@ gleam = "0.6"
glib = { version = "0.8", features = ["subclassing"] }
gstreamer = { version = "0.14", features = ["subclassing"] }
gstreamer-base = { version = "0.14", features = ["subclassing"] }
gstreamer-gl = { version = "0.14", features = ["v1_16"] }
gstreamer-gl = { version = "0.14" }
gstreamer-gl-sys = { version = "0.8" }
gstreamer-video = { version = "0.14", features = ["subclassing"] }
log = "0.4"
lazy_static = "1.4"
@@ -24,18 +24,19 @@ To run locally:
```
GST_PLUGIN_PATH=target/gstplugins \
gst-launch-1.0 servosrc \
! queue \
! video/x-raw,framerate=25/1,width=512,height=512 \
! videoflip video-direction=vert \
! autovideosink
! videorate \
! video/x-raw\(memory:GLMemory\),framerate=50/1,width=1920,height=1080,format=RGBA \
! glimagesink rotate-method=vertical-flip
```

*Note*: the following don't work, for some reason the pipeline isn't providing GLMemory.

To stream over the network:
```
GST_PLUGIN_PATH=target/gstplugins \
gst-launch-1.0 servosrc \
! queue \
! video/x-raw,framerate=25/1,width=512,height=512 \
! videorate \
! video/x-raw\(memory:GLMemory\),framerate=50/1,width=1920,height=1080,format=RGBA \
! gldownload \
! videoconvert \
! videoflip video-direction=vert \
! theoraenc \
@@ -46,9 +47,9 @@ GST_PLUGIN_PATH=target/gstplugins \
To save to a file:
```
GST_PLUGIN_PATH=target/gstplugins \
gst-launch-1.0 servosrc num-buffers=2000 \
! queue \
! video/x-raw,framerate=25/1,width=512,height=512 \
! videorate \
! video/x-raw\(memory:GLMemory\),framerate=50/1,width=1920,height=1080,format=RGBA \
! gldownload \
! videoconvert \
! videoflip video-direction=vert \
! theoraenc \

0 comments on commit 06a10c5

Please sign in to comment.
You can’t perform that action at this time.