GStreamer 1.0: Rework stats file removal
We have a TODO in finalsink to # TODO: Implement more robust file removal system for stat files
Currently, in combine_stats
, we
- assume the filename format of all files in the node directory (e.g. 013, 014, 019)
- Explicitly ignore empty filenames
- Iterate through each bank, and again assume the filename format
- Calculate a duration based on the collected filenames
- Pass the result of all this through to calcfap
- Append the old stats to a variable on FAPUpdater
- Delete the old stats when we next try to combine stats. (after waiting for the last calcfap process to end)
This whole process can at least be cleaned up, but ideally reworked. I don't like relying on filenames to store data, or to fit a particular file format, and it seems like FAPUpdater itself should be doing most of this work (especially file deletion as the last step of the process).