In chdkptp
changeset 350 I've moved the handling of chunks into lua. This is in preparation for changing DNG, but the protocol isn't changed yet.
I would like to know if this works on the cameras that require seek in the jpeg chunks.
If someone with one of these cameras can show me the output of
set cli_verbose=2
rs -f=3
that would be helpful.
This will require work on the dng module - create_dng_header() is not suitable for this, unless it gets changed. Making a copy of it would again create maintainability problems.
I think it will be fairly simple to make create_dng_header() take some options.
An additional downside is that whoever implements a new client, may not feel like messing with this - but at least headerless RAW will always be available.
and sample code will be available in chdkptp, though likely split between C and Lua which may not be clear to many users.
-The module's unload checker currently bases its decision on the two RAW related config values. What else should it check when rc is involved? Play mode? Timeout? USB presence?
Yes, this is the question. USB present seems like the most logical, but we really want to know if there is a USB connection, not USB power. A timeout that resets whenever a DNG remote shoot is requested should be fairly simple.
Bad pixel treatment* depends on this, so it does matter which version is chosen. I don't think that this(*) task belongs to the client side. You wrote above that "no bad pixel patching". Hmmm. That's DNG 1.3
My proposal is they get pure raw data + a DNG header, not DNG data. Since the client is responsible for reversing, it could just as easily patch badpixels too.
That said, I guess if client patches the badpixels, then a 1.3 would load just fine in most programs, and the opcodes would be just be ignored or have no effect. So maybe just forcing 1.3 is fine.
The other way of completing RAW/DNG could be:
DNG and its version is sent as an option (these bits would need to be treated differently, not as another data type of course). This would require a ptp-local state variable (where should these be kept?). Leave create_dng_for_ptp() almost as it is now (byte reversal and badpixel patching would become optional). In case of partial raw, the client patches the header.
Yes, I thought about a few variants of this, but they all seemed to end up messy.