Notification of new jpeg-shots - General Discussion and Assistance - CHDK Forum

Notification of new jpeg-shots

  • 1 Replies
  • 2543 Views
*

Offline ultimA

  • ***
  • 137
Notification of new jpeg-shots
« on: 01 / November / 2010, 10:22:51 »
Advertisements
Hello,

I'd like a custom subroutine be called whenever a new shot has been saved onto the card AND get the name/path of the new file as well. After inspecting the CHDK sources, I think there is no functionality like that currently, but I'll ask here just to be sure.

If this is something new, than probably some new hook into the ASM needs to be injected. When is capt_seq_hook_raw_here() called, before or after JPEG creation?

And even when the right place for the new hook is found, the question still remains where to get the newly created filename from. (A naive way would be to read a list of all files before and after the shot and compare them, but with large cards and many pictures memory could run, so this is not a good approach).

ultimA

*

Offline reyalp

  • ******
  • 14082
Re: Notification of new jpeg-shots
« Reply #1 on: 01 / November / 2010, 12:19:16 »
The jpeg has not yet been created in the raw hook. However, you can figure out the name of the next jpeg there. You also will know at that point that the jpeg will be available when shooting is complete, which you should also be able to find out using existing code. Look at the raw hook code where it figures out the name for the raw, and just use IMG_<num>.JPG instead.
Don't forget what the H stands for.

 

Related Topics