-
Hello, I like the appeal of the format and especially due to coming from a background that used PCAP data format. However, while testing out the python version of the mcap library, especially following an example (https://mcap.dev/docs/python/raw_reader_writer_example), i noticed that calling "finish()" is essential for the format to function correctly, because if i recorded data then closed the program without calling it, the resulting read operation (which seems to be via mcap.reader.make_reader ?) will run into corruption issues. The problem is that in real-world recording scenarios, a graceful file closing isn't always possible, especially in a simple example where there's a shell window open running the recording, and the user for example simply clicks the "X" button to close the window rather than CTRL+C or some other method that gives the program a chance to run the function. Additionally, I currently can't find a code-specific way to dynamically repair a file or work with a damaged file. it seems like the only solution is a CLI command (mcap doctor, i believe). This would not be sufficient. So, i have two questions:
Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
finish()
ensures that the file has a complete summary/index, which is required if you want features like fast summarization and fast seeking/filtering. If a file is not indexed, it can still be read linearly from the beginning, and you can simply continue reading until reaching EOF. This is whatmcap recover
does. In Python this can be done with StreamReader.