After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 462979 - Add 'silent' property to GstTimeOverlay
Add 'silent' property to GstTimeOverlay
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-03 03:18 UTC by Yang Hong
Modified: 2007-08-08 16:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
path to add silent property to timeoverlay. (3.55 KB, patch)
2007-08-03 03:20 UTC, Yang Hong
none Details | Review
path to add silent property to timeoverlay. (3.75 KB, patch)
2007-08-03 04:41 UTC, Yang Hong
none Details | Review
Add 'silent' property to GstTextOverlay, against cvs header (2.98 KB, patch)
2007-08-06 03:16 UTC, Yang Hong
none Details | Review
update: added document (3.72 KB, patch)
2007-08-06 03:50 UTC, Yang Hong
committed Details | Review

Description Yang Hong 2007-08-03 03:18:44 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 :)
Comment 1 Yang Hong 2007-08-03 03:20:28 UTC
Created attachment 92962 [details] [review]
path to add silent property to timeoverlay.
Comment 2 Yang Hong 2007-08-03 04:41:53 UTC
Created attachment 92964 [details] [review]
path to add silent property to timeoverlay.

fix compile warning/error:)
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-05 14:19:06 UTC
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?
Comment 4 Yang Hong 2007-08-06 03:16:03 UTC
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
Comment 5 Yang Hong 2007-08-06 03:20:34 UTC
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.
Comment 6 Yang Hong 2007-08-06 03:50:25 UTC
Created attachment 93132 [details] [review]
update: added document
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-08 16:08:08 UTC
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