Hi,
I'm looking for a general solution in camera preview application.
When I use the following sequence, there is no problem in normal case.
Normally application sleeps in poll and then will be waked up by Camera VSYNC.
while (1) {
poll
DQBUF
memcpy to FB
QBUF
}
But sometimes there is non-periodic long delay more than 1sec in application.
So before calling poll some buffers has been already passed to outgoing queue.
So in a single time quantum(schedule) many memcpy operations are done
on FB like:
poll -> DQBUF -> memcpy -> QBUF -> poll(no sleep) -> DQBUF -> memcpy...
So preview isn't unnatural owing to memcpy without delay.
In that case what is a general solution ?
In my opinion frame drop can be a solution.
So now I changed the sequence as below.
open device with non-block flag.
while (1) {
while (ret != -EAGAIN) {
idx = dp_idx;
ret = DQBUF(&dq_idx);
}
if (idx < -1) {
poll
DQBUF(&idx)
}
memcpy to FB
QBUF
}
Best regards,
Jonghun Han,
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html