CaptSeq and MovieRecord timing question - General Discussion and Assistance - CHDK Forum supplierdeeply

CaptSeq and MovieRecord timing question

  • 3 Replies
  • 3899 Views
CaptSeq and MovieRecord timing question
« on: 18 / August / 2010, 12:35:36 »
Advertisements
Another question that I can answer eventually with poking and prodding, but asking in case someone knows and can save me the time:

At what point does execution branch to CaptSeq and/or MovieRecord? My assumption is that the keyboard handler takes a shutter press event, and depending on the current mode branches to one of these two. But I could easily be wrong, for example some other preparation code might be called first, or maybe CaptSeq only handles execution *after* capture.

Anyone know details about this offhand?

*

Offline reyalp

  • ******
  • 14119
Re: CaptSeq and MovieRecord timing question
« Reply #1 on: 18 / August / 2010, 12:49:43 »
Both of these are tasks, which sit in a loop waiting for messages as long as the camera is running. The messages are sent to these tasks at various point. I haven't looked at the movie one, but I've investigated capt_seq in some detail.

There are messages sent when shooting settings changed, after half press, after the shot is taken, and so on.

Code: [Select]
  tick   dt  msg# physw[0]    physw[1]   physw[2]     .... debug values...
   21410    0 0x00 0x1CC42EE3 0xE04A650D 0x00208FFE 0x00000000 0xFEEDBABE 0xEA75BEEF 0xC0FFEEEE
   22950 1540 0x01 0x9CC42EE1 0xE04A6B4D 0x0020AFFC 0x00000000 0xFEEDBABE 0x0000007B 0xC0FFEEEE
   23780  830 0x1E 0x1CC426E2 0xE04A654D 0x00208FFF 0xDEADBEEF 0xFEEDBABE 0xEA75BEEF 0xC0FFEEEE
   23780    0 0x04 0x1CC426E2 0xE04A654D 0x00208FFF 0xDEADBEEF 0xFEEDBABE 0xEA75BEEF 0xC0FFEEEE
   23890  110 0x1C 0x1CC426E1 0xE04A6B4D 0x0020AFFF 0xDEADBEEF 0xFEEDBABE 0xEA75BEEF 0xC0FFEEEE


Above is from a normal still shot. You can see the shoot button state in physw[2]: *FE is half press, *FC is full press. Not that this is the buttons state when the message arrived, not the time the button changed. msg# 0 is sent 50ms after kbd task notices the half press.
Don't forget what the H stands for.

Re: CaptSeq and MovieRecord timing question
« Reply #2 on: 18 / August / 2010, 15:36:02 »
Both of these are tasks, which sit in a loop waiting for messages as long as the camera is running. The messages are sent to these tasks at various point. I haven't looked at the movie one, but I've investigated capt_seq in some detail.

There are messages sent when shooting settings changed, after half press, after the shot is taken, and so on.
...
Above is from a normal still shot. You can see the shoot button state in physw[2]: *FE is half press, *FC is full press. Not that this is the buttons state when the message arrived, not the time the button changed. msg# 0 is sent 50ms after kbd task notices the half press.

I haven't been entirely clear yet on the interaction of physw with the other parts of the system. It is the button event handler, yes? So you press the shutter, physw is sitting in a loop and detects this, then sends the appropriate message to the appropriate task based on what button and what mode we're in?

*

Offline reyalp

  • ******
  • 14119
Re: CaptSeq and MovieRecord timing question
« Reply #3 on: 18 / August / 2010, 18:42:24 »
I haven't been entirely clear yet on the interaction of physw with the other parts of the system. It is the button event handler, yes? So you press the shutter, physw is sitting in a loop and detects this, then sends the appropriate message to the appropriate task based on what button and what mode we're in?
Physw polls the switch values (not just buttons but things like the battery door, sd card lock and some unidentified ones) and sets what we call physw_status. I don't know how exactly it gets from there to sending a message to capt_seq, there are a number of intervening layers. You can do PostLogicalEventToUI with a shutter button event and capt_seq will receive the appropriate message without any real button press.

Also keep in mind that not all the messages to say capt_seq are necessarily generated by button changes.
Don't forget what the H stands for.


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal