grim/pidgin3-gstreamer-poc
Clone
Summary
Browse
Changes
Graph
add a text overlay to the user's video source
draft
2022-04-12, Gary Kramlich
7b961c2e090c
Parents
a5eaefe9d75e
Children
cab5b7d57347
add a text overlay to the user's video source
1 files changed, 9 insertions(+), 1 deletions(-)
+9
-1
poc/ui.py
--- a/poc/ui.py Tue Apr 12 04:04:35 2022 -0500
+++ b/poc/ui.py Tue Apr 12 04:09:32 2022 -0500
@@ -23,7 +23,15 @@
video = Gst.ElementFactory.make('videotestsrc', 'video-source')
bin.add(video)
- video_source_pad = video.get_static_pad('src')
+ overlay = Gst.ElementFactory.make('textoverlay', 'user-lower-third')
+ bin.add(overlay)
+ overlay.set_property('text', 'rw_grim')
+ overlay.set_property('halignment', 'left')
+ overlay.set_property('font-desc', '"Sans, 72"')
+
+ video.link(overlay)
+
+ video_source_pad = overlay.get_static_pad('src')
ghost_pad = Gst.GhostPad.new(UI_VIDEO_SOURCE_PAD, video_source_pad)
bin.add_pad(ghost_pad)