Skip to content

Commit

Permalink
GStreamer plugin should use GLMemory
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Dec 5, 2019
1 parent bb00a83 commit 06a10c5
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 252 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ports/gstplugin/Cargo.toml
Expand Up @@ -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"
Expand Down
21 changes: 11 additions & 10 deletions ports/gstplugin/README.md
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit 06a10c5

Please sign in to comment.