GNOME Bugzilla – Bug 462979
Add 'silent' property to GstTimeOverlay
Last modified: 2007-08-08 16:08:08 UTC
I want to disable time info on the on screen video sometimes, e.g Before I press "Start recording" on a pipeline for record video from camera. With this property, I donn't need to link/unlink timeoverlay element in to the x-sink, Ijust set silent=TRUE. That save me from proccessing link/unlink. I'm not sure if this property should add to GstTextOverlay, so I select the simplest way to add it to TimeOverlay :)
Created attachment 92962 [details] [review] path to add silent property to timeoverlay.
Created attachment 92964 [details] [review] path to add silent property to timeoverlay. fix compile warning/error:)
Sounds like a good idea. But if this would be done in GstTextOverlay it would work for all Time, Text and ClockOverlay. In TextOverlay there is this code which could check for 'silent'. if (klass->get_text) { text = klass->get_text (overlay, buffer); } else { text = g_strdup (overlay->default_text); } Can you make a new patch?
Created attachment 93131 [details] [review] Add 'silent' property to GstTextOverlay, against cvs header Add 'silent' property to GstTextOverlay, so it works for all Time, Text and ClockOverlay. 'silent' default: false Test: gst-launch videotestsrc ! timeoverlay ! ffmpegcolorspace ! ximagesink gst-launch videotestsrc ! timeoverlay silent=false ! ffmpegcolorspace ! ximagesink gst-launch videotestsrc ! timeoverlay silent=true ! ffmpegcolorspace ! ximagesink gst-launch videotestsrc ! clockoverlay ! ffmpegcolorspace ! ximagesink gst-launch videotestsrc ! clockoverlay silent=false ! ffmpegcolorspace ! ximagesink gst-launch videotestsrc ! clockoverlay silent=true ! ffmpegcolorspace ! ximagesink
BTW, I don't konw if there is any thing would be done in the text_chain () func in the TextOverlay.. The patch just transform buffer (push and return) in video_chain () when silent=true, else add overlay as orignal.
Created attachment 93132 [details] [review] update: added document
Thanks a lot! 2007-08-08 Stefan Kost <ensonic@users.sf.net> patch by: Yang Hong <hongyang@redflag-linux.com> * ext/pango/gsttextoverlay.c: * ext/pango/gsttextoverlay.h: Add 'silent' property to GstTimeOverlay. Fixes #462979