08-25-2022 04:23 AM
08-25-2022 04:34 AM
08-25-2022 06:11 AM - edited 08-25-2022 06:24 AM
Hi farooq,
@farooqmardan wrote:
can u guide me how to read the specified number of bytes from the binary file in specified time? Means i want to read 770 bytes (1 frame ) in 3.33msec time.. that is equivalent to data rate of 1.848Mbps. how to do that
Why do you want to time the FileRead operation? It shouldn't matter for your algorithm as long as you can read the file fast enough!
The more interesting part is to output the data at the required datarate...
Edit:
Please don't ask the same question in several threads. Keep your discussion in one place!
08-25-2022 06:44 AM - edited 08-25-2022 06:49 AM
Hello,
very long time ago I was creating this (should be easy to reproduce, thats why it's only a picture):
This does (almost), what you are asking for, but there are some points to mention:
The red cells are the ms- times the "Wait Until Next ms Multiple"- function will wait to and altering the wait time will lead to wrong cycle times.
Second complex:
A good approach to program a video player is to wait in a loop to a certain point of time (e.g. multiples of 40ms), determine the real time (if you jump over one or more multiples, you get back to track) then calculate, which frame is to be shown at this time and load that frame into the frame buffer / picture control. This ensures, that your video has the right speed and will have the predicted play- time.
09-01-2022 02:08 AM
hi actually that the file i am reading is the video recorded file of size 778 bytes. 8 bytes at the start are the time stamps. the file read should be synced with these time stamps for no frame loss and for constant data rate at which the file has been recorded.
09-01-2022 02:12 AM
sorry for late reply
these are 300 frames of 778 bytes of data not the video frames. the first 8 bytes are the time stamps at the specific format . the first objective is to play the file according to that time stamps and see what data rate it comes out to be
09-01-2022 02:29 AM
This leaves more questions than it answers.