Some news.
I've been trying to implement YUV support for the A470. Looks like it's a no-go with the filewrite hook. It appears that by the time the filewritetask hook is reached, the YUV source of the JPEG is overwritten by the decompressed Y411 version of the fresh JPEG (unless 640x480 size is selected). So, either a new hook or no YUV support on this camera...
The interesting find is that in addition to the resized YUV, there are remnants of a full sized YUV image, regardless of the selected image dimensions.
For the rs "bug" I came up with the following (it's probably influenced by lapser's findings)
function rs_shoot(opts)
local rec,vid = get_mode()
if not rec then
return false,'not in rec mode'
end
if type(init_remotecap) ~= 'function' then
return false, 'remotecap not supported'
end
if bitand(get_remotecap_support(),opts.fformat) ~= opts.fformat then
return false, 'unsupported format'
end
if not init_remotecap(opts.fformat,opts.lstart,opts.lcount) then
return false, 'init failed'
end
press('shoot_half')
local shtimeout = get_tick_count()
repeat
sleep(10)
until ( get_shooting() ) or ( (get_tick_count()-shtimeout)>5000 )
reset_shoot_ok()
press('shoot_full')
local gsrtime = get_tick_count()
repeat
sleep(10)
until ( get_shoot_ok() ) or ( (get_tick_count()-gsrtime)>5000 )
release('shoot_full')
return true
end
reset_shoot_ok() and get_shoot_ok() are new functions. They use a new static variable which is set in the raw hook capt_seq_hook_set_nr() . This approach appears to work on the A410 and 470 - even with flash. My trials included putting arbitrary delays after pressing shoot_full, but that method was unreliable (unless the delay was set to like 2 seconds).
edit: not raw hook, capt_seq_hook_set_nr()