gstclockoverlay: Add ability to specify which time to be displayed by GstClockOverlay
Submitted by Abhinav
Link to original bug (#793683)
Description
Created attachment 368688
Patch for adding ability to specify time to be displayed by GstClockOverlay
GstClockOverlay presently displays buffer arrival time as default. In certain scenarios, users would like to display buffer's timestamp, rather than buffer arrival time - to avoid any gaps caused by latency between frame source and clockoverlay element in pipeline.
I propose to add property called "time-mode", where users should be able to specify what time to show. So other than current default, there can be another option for time-mode say "buffer-time", to indicate that clockoverlay will be using buffer's time for display.
Example element configuration can look like following :
clockoverlay halignment=right valignment=bottom time-format="%Y-%m-%d %H:%M:%S" time-mode=1
Where time-mode=1 represents "buffer-time".
Attached is the implementation for the same.
Note: GstTimeOverlay uses buffer time, but that doesn't have capability to display in clock format. Since clockoverlay is used to display text in clock format, it was found more suitable for said requirement.
Patch 368688, "Patch for adding ability to specify time to be displayed by GstClockOverlay":
0001-gstclockoverlay-add-time-mode-property-to-specify-wh.patch
Version: 1.10.x