Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] VIDEO_GET_EVENT + VIDEO_GET_SIZE



Hi,

I just implemented these ioctls for the AViA chip set. There is no
"aspect ratio changed" or "resolution changed" interrupt, so I abused a
"displaying first I-frame" interrupt for video size events, which polls
the status registers.

Some questions came up while coding:

- Imaging two programs not knowing of each other, one with write access
to the video device and one with read only access.
The reader might not know that video has been stopped by the writer,
maybe because he was just to slow or busy after doing a
VIDEO_GET_STATUS. Shall VIDEO_GET_SIZE fail on stopped video devices?
Shall it return 0x0 4:3? (There is no "unknown aspect ratio"
definition.) Or shall it return the last valid resolution and ratio?

- What is the expected result for a reader who does a VIDEO_GET_SIZE
before any writer has opened the device?

- Why are there multiple events of the same type in the event queue?
Wouldn't it be enough to provide only the latest event, because the
application would usually not want to handle e.g. multiple video size
changed events if it already missed or ignored some of them?

- Should VIDEO_GET_EVENT report events for values already read by
VIDEO_GET_SIZE? My guess is yes, because VIDEO_GET_SIZE might have been
called by a second application while another one, which does a
VIDEO_GET_EVENT after that, might miss it.

- Shall VIDEO_STOP or close() by a writer generate an event like 0x0 4:3
for possible readers? Shall VIDEO_GET_EVENT fail on closed or stopped
devices? Shall it return for blocking readers on close or stop? (Similar
question as above..)

I am quite tired now, but I hope it is possible to understand my
questions (which confused myself even more than before writing them
down). :-)

Best Regards,
Andreas




-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index