Hi Upadhya, Try using timeval structure to calculate the time taken to capture and display the frames.
Thanks, Arun. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Venkatachala Upadhya Sent: Tuesday, December 16, 2008 12:10 AM To: [email protected] Subject: How to ensure that I am capturing only 30 or 25 or say X frames in a second? Greetings to the list users!, I am using DVEVM DM6446 board. I have studied the TI demo program encodedecode. What I have observed is, there is no way to know or ensure that the number of frames captured is equal to 25 or 30 frames per second. For that matter X frames per second. Has any one comes across or have experience in this regard? Can you please share the same? Second question: Usleep - Is this working as expected in MontaVista kernel 2.6.10? I did the following. 30 frames equals 1 second, or 1000000 (10^6) microsecond. Therefore 1 frame is equal to 33333 microsecond. So one has to introduce a usleep between two consecutive capture, such that one can ensure, not more that 30 frames are captured. I tried with different values and finally with usleep(1) and observed the playback, using encodedecode demo. The playback is very very slow. By this I am sure that the number of frames captured is not equal to 30. As soon as I introduced usleep(Y), where Y is more than 0, I see the sluggish playback. Any clue?, I am suspecting that usleep is not correctly implemented in MontaVista kernel 2.6.10? Or it could be that, processing power of DM6446 could be just enough or not enough for both capture and play back application at 30 frames with D1 resolution? Any insight into this would be helpful. With best regards, Venkatachala Upadhya| Extn: 65395| -- This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where. _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
