I want in each frame a video that is written to insert a date. In fact, draw it and then just give the frame for preview and recording. I read that this is done through the onPreviewFrame
method, which receives a byte[]
array with a frame. How to edit it?
2 answers
Data received through Camera.PreviewCallback()
cannot be edited. You just get access to bit data with which you can do anything, except send back changed.
|
Quite a non-trivial task. And rather incomprehensible in terms of "why." If you need to do it on the fly, then you need to know at least the format of the video (byte-by-bye), and if not on the fly, then get each frame as an image and you only need to know the format of the image (byte-wise).
Knowing the format you can insert the data in the right place without losing others.
- I am writing an application for a diploma and its part is essentially a DVR. And I want to record the video immediately with the date, as it was done, in fact, in the DVRs, so that when playing this video somewhere in the corner, for example, the time and date are displayed. Is it possible to do this? - FoX4 pm
- one@ FoX4: DVR times can, and you can. - VladD
- If possible, I would like more specifically ... How to do it, by what methods? Is it possible to process a frame via onPreviewFrame and issue it for recording and previewing? - FoX4
|