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

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

  • 39 Replies
  • 16455 Views
*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Question for devs: How to find out if movie recording in progress?
« Reply #10 on: 05 / April / 2008, 04:21:45 »
Advertisements
is there an automated way of finding out, perhaps? :D


May be... :D
> grep -r -E -A3 "LDR[ ]+R5,[ ]+=0x" */sub/*/movie_rec.c | grep -B3 "CMP" | grep -E "LDR[ ]+R5,[ ]+=0x"
Quote
a460/sub/100d/movie_rec.c:                "LDR     R5, =0x91D54\n"   
a530/sub/100a/movie_rec.c:                "LDR     R5, =0x64704\n"
a540/sub/100b/movie_rec.c:                "LDR     R5, =0x64794\n"   
a550/sub/100c/movie_rec.c:                "LDR     R5, =0x9BAFC\n"
a560/sub/100a/movie_rec.c:                 "LDR     R5, =0xA2778\n"
a570/sub/100e/movie_rec.c:                "LDR     R5, =0xA30C0\n"   
a570/sub/101a/movie_rec.c:                "LDR     R5, =0xA30C0\n"   
a610/sub/100e/movie_rec.c:                "LDR     R5, =0x73634\n"
a610/sub/100f/movie_rec.c:                "LDR     R5, =0x73634\n"             
a620/sub/100f/movie_rec.c:                "LDR     R5, =0x739A4\n"
a630/sub/100c/movie_rec.c:                "LDR     R5, =0x666CC\n"             
a640/sub/100b/movie_rec.c:                "LDR     R5, =0x66894\n"
a700/sub/100b/movie_rec.c:                "LDR     R5, =0x6E47C\n"             
a710/sub/100a/movie_rec.c:                "LDR     R5, =0x715BC\n"   
g7/sub/100e/movie_rec.c:                "LDR     R5, =0x771E0\n"
g7/sub/100g/movie_rec.c:                "LDR     R5, =0x771E0\n"   
g7/sub/100i/movie_rec.c:                "LDR     R5, =0x771E0\n"   
g7/sub/100j/movie_rec.c:                "LDR     R5, =0x771E0\n"   
ixus55_sd450/sub/100b/movie_rec.c:                "LDR     R5, =0x7CDBC\n"
ixus55_sd450/sub/100c/movie_rec.c:                "LDR     R5, =0x7CDBC\n"
ixus700_sd500/sub/101a/movie_rec.c:                "LDR     R5, =0x6F684\n"   
ixus700_sd500/sub/101b/movie_rec.c:                "LDR     R5, =0x6F684\n"
ixus70_sd1000/sub/100c/movie_rec.c:                 "LDR     R5, =0xBB550\n"
ixus70_sd1000/sub/101b/movie_rec.c:                "LDR     R5, =0xBB550\n"
ixus70_sd1000/sub/102a/movie_rec.c:                 "LDR     R5, =0xBB550\n"
ixus800_sd700/sub/100b/movie_rec.c:                "LDR     R5, =0x6ECA4\n"
ixus800_sd700/sub/101b/movie_rec.c:                 "LDR     R5, =0x6ECA4\n"
ixus850_sd800/sub/100e/movie_rec.c:                 "LDR     R5, =0x8BBF8\n"
ixus950_sd850/sub/100c/movie_rec.c:"                LDR     R5, =0xA8638\n"
s2is/sub/100e/movie_rec.c:                "LDR     R5, =0x5C95C\n"                       
s2is/sub/100f/movie_rec.c:                "LDR     R5, =0x5C95C\n"             
s2is/sub/100g/movie_rec.c:                "LDR     R5, =0x5C97C\n"             
s3is/sub/100a/movie_rec.c:                "LDR     R5, =0x6115C\n"   
« Last Edit: 05 / April / 2008, 04:24:07 by GrAnd »
CHDK Developer.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #11 on: 05 / April / 2008, 04:27:13 »
you truly do know your environment well. asm, c and even shell. thanks!
have you read my last question in my last post too?
good thing with me being so stupid is that other people too scared to ask the same questions get their answers ;)

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Question for devs: How to find out if movie recording in progress?
« Reply #12 on: 05 / April / 2008, 04:43:41 »
you truly do know your environment well. asm, c and even shell. thanks!
Even more :D
> grep -r -E -A3 "LDR[ ]+R5,[ ]+=0x" */sub/*/movie_rec.c | grep -B3 "CMP" | grep -E "LDR[ ]+R5,[ ]+=0x" | sed "s/ *\" *LDR *R5, *=/  DEF\(movie_state, /;s/\\\n\"/\)/"
Quote
a460/sub/100d/movie_rec.c:  DEF(movie_state, 0x91D54)   
a530/sub/100a/movie_rec.c:  DEF(movie_state, 0x64704)
a540/sub/100b/movie_rec.c:  DEF(movie_state, 0x64794)   
a550/sub/100c/movie_rec.c:  DEF(movie_state, 0x9BAFC)
a560/sub/100a/movie_rec.c:  DEF(movie_state, 0xA2778)
a570/sub/100e/movie_rec.c:  DEF(movie_state, 0xA30C0)   
a570/sub/101a/movie_rec.c:  DEF(movie_state, 0xA30C0)   
a610/sub/100e/movie_rec.c:  DEF(movie_state, 0x73634)
a610/sub/100f/movie_rec.c:  DEF(movie_state, 0x73634)             
a620/sub/100f/movie_rec.c:  DEF(movie_state, 0x739A4)
a630/sub/100c/movie_rec.c:  DEF(movie_state, 0x666CC)             
a640/sub/100b/movie_rec.c:  DEF(movie_state, 0x66894)
a700/sub/100b/movie_rec.c:  DEF(movie_state, 0x6E47C)             
a710/sub/100a/movie_rec.c:  DEF(movie_state, 0x715BC)   
g7/sub/100e/movie_rec.c:  DEF(movie_state, 0x771E0)
g7/sub/100g/movie_rec.c:  DEF(movie_state, 0x771E0)   
g7/sub/100i/movie_rec.c:  DEF(movie_state, 0x771E0)   
g7/sub/100j/movie_rec.c:  DEF(movie_state, 0x771E0)   
ixus55_sd450/sub/100b/movie_rec.c:  DEF(movie_state, 0x7CDBC)
ixus55_sd450/sub/100c/movie_rec.c:  DEF(movie_state, 0x7CDBC)
ixus700_sd500/sub/101a/movie_rec.c:  DEF(movie_state, 0x6F684)   
ixus700_sd500/sub/101b/movie_rec.c:  DEF(movie_state, 0x6F684)
ixus70_sd1000/sub/100c/movie_rec.c:  DEF(movie_state, 0xBB550)
ixus70_sd1000/sub/101b/movie_rec.c:  DEF(movie_state, 0xBB550)
ixus70_sd1000/sub/102a/movie_rec.c:  DEF(movie_state, 0xBB550)
ixus800_sd700/sub/100b/movie_rec.c:  DEF(movie_state, 0x6ECA4)
ixus800_sd700/sub/101b/movie_rec.c:  DEF(movie_state, 0x6ECA4)
ixus850_sd800/sub/100e/movie_rec.c:  DEF(movie_state, 0x8BBF8)
ixus950_sd850/sub/100c/movie_rec.c:  DEF(movie_state, 0xA8638)
s2is/sub/100e/movie_rec.c:  DEF(movie_state, 0x5C95C)                       
s2is/sub/100f/movie_rec.c:  DEF(movie_state, 0x5C95C)             
s2is/sub/100g/movie_rec.c:  DEF(movie_state, 0x5C97C)             
s3is/sub/100a/movie_rec.c:  DEF(movie_state, 0x6115C)   

next question: what about cams that dont have movie_record_task (like a650)?
if they dont have the variable declared in their stubs_min.S, what happens if i make the check like
In that case you should declare this variable in other way (i.e. as int variable in C-file and assign it with 0). Otherwise, it will not compile.
CHDK Developer.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #13 on: 05 / April / 2008, 04:50:30 »
you truly do know your environment well. asm, c and even shell. thanks!
Even more :D
> grep -r -E -A3 "LDR[ ]+R5,[ ]+=0x" */sub/*/movie_rec.c | grep -B3 "CMP" | grep -E "LDR[ ]+R5,[ ]+=0x" | sed "s/ *\" *LDR *R5, *=/  DEF\(movie_state, /;s/\\\n\"/\)/"
Quote
...
darn, about 10 minutes too late :D thanks anyways, will help me doing these "batch-jobs" in future.
Quote
next question: what about cams that dont have movie_record_task (like a650)?
if they dont have the variable declared in their stubs_min.S, what happens if i make the check like
In that case you should declare this variable in other way (i.e. as int variable in C-file and assign it with 0). Otherwise, it will not compile.
okay, that makes sense. but in which file should i declare this?


*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Question for devs: How to find out if movie recording in progress?
« Reply #14 on: 05 / April / 2008, 05:03:40 »
okay, that makes sense. but in which file should i declare this?
lib.c ? :D
CHDK Developer.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #15 on: 05 / April / 2008, 05:11:28 »
sorry to need help again:
Quote
int movie_state()
{
    return 0;
}
in a650's lib.c will throw error  at compile time
Quote
lib.c:65: error: 'movie_state' redeclared as different kind of symbol
../../../../include/platform.h:423: error: previous declaration of 'movie_state' was here
which kinda makes sense too. how do i avoid that again? :D

edit: funny thing is, if my feature will ever make it to trunk, i cant even claim it is written by me :D

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Question for devs: How to find out if movie recording in progress?
« Reply #16 on: 05 / April / 2008, 05:19:07 »
Nope. :)
You need just a variable.

Quote
int movie_state = 0;
CHDK Developer.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Question for devs: How to find out if movie recording in progress?
« Reply #17 on: 05 / April / 2008, 05:27:34 »
For A650 this address is 0x5518+0x38
A720: 0x5538+0x38
IXUS860: 0x54E0+0x3C

upd: the same "4" value during video record.
« Last Edit: 05 / April / 2008, 05:37:57 by ewavr »


Re: Question for devs: How to find out if movie recording in progress?
« Reply #18 on: 05 / April / 2008, 05:27:47 »
Nice finding all! Now I can make a reliable video start and video stop button on my remote :D!

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Question for devs: How to find out if movie recording in progress?
« Reply #19 on: 05 / April / 2008, 06:19:51 »
seems to work. however when i compile a720 or sd650 it throws an error like this:
Quote
conf.o: In function `conf_change_alt_mode_button':
conf.c:(.text+0x144): undefined reference to `kbd_set_alt_mode_key_mask'
this isnt related to movie_status though. probably related to not being up to date with trunk?

 

Related Topics