Question for devs: How to find out if movie recording in progress? - page 4 - General Discussion and Assistance - CHDK Forum
supplierdeeply

Question for devs: How to find out if movie recording in progress?

  • 39 Replies
  • 21676 Views
*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #30 on: 22 / July / 2008, 13:27:52 »
Advertisements
And after declaration via DEF(...) we can write in this variable:

movie_state=1; // pause movie recording (at least on A710)
....
movie_state=4; // resume movie recording (sorry, after resume sound not synchronized with video)


i'm quiete interested in the pause function (and resuming of course) and maybe stopping and starting via this method. what exactly do you mean by declaration via DEF(...)?
sorry to bother you about so many things (also need the soundplay option of course :D), but you seem to have superpowers :D

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #31 on: 24 / July / 2008, 09:32:50 »
ok, thanks to ewavr i finally managed to add a video pause/resume (in script even a stop-) function in here

ewavr - on DigicIII Cams the pause function crashes the camera if you pause more than about 2 seconds. It seems to work flawlessly on DigicII Cams (sound issue aside). also the bitrate setting on the fly seems to work (the code is ugly and heavily in alpha-state and it lacks visual feedback and also has a bug i already found) on both DigicII and DigicIII.

Do you own a DigicIII cam and can you verify the "bug" with the pause function?

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Question for devs: How to find out if movie recording in progress?
« Reply #32 on: 24 / July / 2008, 11:22:30 »
ewavr - on DigicIII Cams the pause function crashes the camera if you pause more than about 2 seconds.

On which camera?

Quote
Do you own a DigicIII cam?

No.
But on A710 I know second method to make pause.
For A570, for example, set 0xA30B0 int variable to non-zero for pause, zero - to resume.

p.s. I think that changing bitrate and pause movie with arror keys is not good idea. Some keys must be reserved for AE lock (disp or +/- ?) and exposure change (left-right?)  - for future implementation.
p.p.s. AE lock can be done right now - ExpCtrlTool_StopConti() already defined for most cameras.
« Last Edit: 24 / July / 2008, 11:30:19 by ewavr »

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Question for devs: How to find out if movie recording in progress?
« Reply #33 on: 24 / July / 2008, 12:29:31 »
p.s. I think that changing bitrate and pause movie with arror keys is not good idea. Some keys must be reserved for AE lock (disp or +/- ?) and exposure change (left-right?)  - for future implementation.
p.p.s. AE lock can be done right now - ExpCtrlTool_StopConti() already defined for most cameras.

I think we could copy Canon's +/- key behavior here: Show in OSD which parameter the left&right buttons change (why not up&down too) and use +/- key to change the currently edited parameter.

If we are running out of buttons, that is.


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #34 on: 24 / July / 2008, 13:18:55 »
ewavr - on DigicIII Cams the pause function crashes the camera if you pause more than about 2 seconds.

On which camera?

Quote
Do you own a DigicIII cam?

No.
But on A710 I know second method to make pause.
For A570, for example, set 0xA30B0 int variable to non-zero for pause, zero - to resume.

p.s. I think that changing bitrate and pause movie with arror keys is not good idea. Some keys must be reserved for AE lock (disp or +/- ?) and exposure change (left-right?)  - for future implementation.
p.p.s. AE lock can be done right now - ExpCtrlTool_StopConti() already defined for most cameras.

well, it has been reported to me (in the german forum/irc chat) that on sx100 and on the A720IS this "2 second bug" exists - probably more. these two cams are DigicIII so i thought maybe this is happening on ALL digicIII. need more feedback on it.
can you tell me the adress you mentioned for any of those two cameras so i can compile a special build for those two guys to test.
yeah, you are right about the keys, we are short on shortcut realestate. but: the up/down/left/right keys havent been used so far (in VIDEO mode, that is!), so i thought: why not ;) remember, this is an alpha code, just quickly hacked together. I will probably do it like this: Press FUNC Button to pause/unpause a movie (similar to how it is done in playback) and press left/right or up/down for quality.
fudgeys idea is also very good. anyhow, i WILL code some kind of gui osd element that highlights the actual keys that can be used.
the whole key/shortcut system has to be redone imo, in a way that you can define your own shortcuts. for example i dont need the enable/disable raw shortcut, because i am always in raw mode (plus, in my branch i have the "raw exceptions option", so this shortcut can be rewired. i think jucifer already had some good ideas about this. i dont imagine this to be sooo hard to code. we basically first have to gather up a list of all keys that can be pressed and then define them for each camera and so on. well you know the deal, talking is easy :D

edit: the "2 second bug" also is in effect on the ixus55, a digic II camera. darn :D
« Last Edit: 24 / July / 2008, 17:19:37 by PhyrePhoX »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Question for devs: How to find out if movie recording in progress?
« Reply #35 on: 24 / July / 2008, 18:29:52 »
Quote
can you tell me the adress you mentioned for any of those two cameras so i can compile a special build for those two guys to test.
SX100IS : 0x5550 + 0x20
A720IS: 0x5538 + 0x20
Zero value mean recording, non-zero value - pause. Tested only on A710  :D
You can find these addresses near the beginning of MovieRecordTask() for any camera. (for example, for s3is this address is 0x61140).

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #36 on: 25 / July / 2008, 09:04:30 »
i somehow confirmed on my s3is that this value can be used for pausing, however when i set this adress to 0 again, the camera does NOT unpause the recording. also, sometimes when i pause it, it crashes the camera after 1 second, sometimes not. i have not been able to reproduce it.
here is the code i used: Diff pastecode - collaborative debugging tool

by the way i still don't get how you get this +0x20 offset for the other cameras you mentioned.

feedback from hacki (sx100 user): pausing seems to work, cam does not crash after 2 seconds, however he cannot unpause the movie as well.
« Last Edit: 25 / July / 2008, 09:49:10 by PhyrePhoX »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Question for devs: How to find out if movie recording in progress?
« Reply #37 on: 25 / July / 2008, 12:15:45 »
however when i set this adress to 0 again, the camera does NOT unpause the recording. also, sometimes when i pause it, it crashes the camera after 1 second, sometimes not. i have not been able to reproduce it.

Quote
feedback from hacki (sx100 user): pausing seems to work, cam does not crash after 2 seconds, however he cannot unpause the movie as well.

I can only say  :( :( :(

Quote
by the way i still don't get how you get this +0x20 offset for the other cameras you mentioned.
SX100IS 1.00C:

ROM:FFC4AE70                 LDR     R0, [R4,#0x20]
ROM:FFC4AE74                 CMP     R0, #0
ROM:FFC4AE78                 BNE     loc_FFC4AF30


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #38 on: 25 / July / 2008, 13:11:25 »
damn. did you check my code if i maybe did something wrong?
only a few cameras seem to be able to be paused (by the first method) and be able to unpause. tough luck :( seems we gotta introduce #define MOVIE_CAN_PAUSE in camera.h :D
thanks for your invested time ewavr, the job is now done - here.
maybe we (er, you!) have more luck with the sound playing thing here: Anyone find any Sound Events / Recording Access? :)

*

Offline reyalp

  • ******
  • 14117
Re: Question for devs: How to find out if movie recording in progress?
« Reply #39 on: 09 / August / 2008, 21:23:45 »
Pause and continue both work for me on a540. I haven't really long times, but 30 sec or so is fine. Sound is out of sync after pause as expect.

A note on movie state:
On my camera it seems to stay 1 forever after you have recorded one movie, even if you switch to still mode.

edit:
and if you are going to check mode values to get movie state, you need to check ALL the MOVIE_* values in the enum. There should probably be a function or macro for this, or flags or something. There are already several bits of code that haven't kept up with the enum.
« Last Edit: 09 / August / 2008, 21:27:18 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal