This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Ian, as mentioned in that feature-request issue, these changes refresh date/time annotations at a configurable interval based on the time resolution of the annotation. The format strings are configurable.
AnnotateImage
DateFormat
which defaults to the formerly hard-coded "dd/MM/yyyy"TimeFormat
which defaults to the formerly hard-coded "HH:mm"RefreshRate
of theDateTimeTextRefreshRate
type described belowMMALCameraComponentExtensions
DateFormat
andTimeFormat
formatting stringsMMALCamera
ProcessAsync
to determine a refresh interval, invoke a refresh task, and control it by tokenRefreshAnnotation
method which awakens periodically to callSetAnnotateSettings
DateTimeTextRefreshRate
intervalsEnableAnnotation
on some custom schemeOn my Pi4 with the 5MP camera encoding a 1080p MP4 (fragmented), I was still able to get a steady 25FPS with the subsecond interval. I imagine older model Pis or maybe the 8MP camera could start to miss frames at 41ms, given I timed the annotation update at about 0.4-0.5ms per invocation.
No conflicts with my other open PR. Hope you like it.