hi all,,
this is my first post here and I hope I can find some help
I'm working on embedded linux on samsung ok6410 board and ov9650 cmos camera
I have to capture a video and save it on a SD-card
I want yo use circular buffer that captures video and when it is full,new data will overwrite old one
there is a flag that when raised,capturing continues for 10 seconds then stops,the video that is saved to sd-card should contains 10 seconds before raising the flag and 10 seconds after raising
I read the capture example on the official site of v4l2 API specifications here
http://free-electrons.com/kerneldoc/...e-example.html
but there are some points that I can't understand or don't know if i understand it correctly
1-in this example,there are 4 frame buffers,each buffer can hold one frame. Is this right?
2-there is a variable (frame_count)that is initialized to 70,does this mean that by finishing this program I will have a video that contains 70 frames?
3- what do the fns (main loop) and (read frame) do? I know what they should do but can't understand the written code ,the loops..etc
3- How can I adjust the fps in this code ? or I should write the value in the camera registers?
4-after capturing the video I will have a buffer that is filled with raw data, I want to compress it or use codecs to save it as MPEG , can I change the pixel format to be compressed (MPEG for example) instead of YUYV? or what should I do to compress the video? codecs or what?
5- can I write these raw data in the buffer to a file .yuv? , I found some software that can play videos of this format
6- Is it possible to use circular buffers instead of linear buffers to hold the captured video?
I know that my post is too long but I'm a newbie and can't find any tutorials that can help me to write my code
thanks in advance