I'll try to answer, but I've had a lot of trouble understanding your post. I know language can be a barrier, but please try to describe specifically what you are trying to accomplish.
i have question about adding new feauture to the ptpchdk and i want ask it in new viwe
What is "viwe"?
By "ptpchdk" do you mean the chdkptp
program, or the CHDK PTP extension
generally, or something else?
I assume chdkptp in the response below, but please clarify if that's not the case.
in this video showing way to receiving external signal to the mat lab I want doing similar ting with serial or parallel port pin and ptpchdk
Again, I don't really understand what specifically
you're trying to do.
It sounds like you want chdkptp to either receive or trigger some signal from external hardware.
If this is the case, your options are generally:
- Run some external program from ckdkptp, using os.execute or io.popen
- Run chdkptp from some external program, piping its input and/or output
- Load some Lua module that that lets you communicate with whatever the hardware is
- Add whatever code you need in C
Which option makes sense depends completely on the details of what you are actually trying to do as well as your resources and skill set.
It's not very likely anyone here is going to write your code for you, but it's impossible
without some more specific detail.
and use this signal as trigger for video triggering frame by frame
Again, I'm not clear what you want here, but neither CHDK nor chdkptp have any capability I would described as "video triggering frame by frame". If the functionality you want doesn't exist in CHDK, it needs to be implemented there first, before you worry about chkdptp and whatever external hardware you have in mind.
The closest you can get to capturing individual video frames would be the live view, using lvdump or lvdumpimg or the corresponding APIs. Beware the live view is low quality and has at least 10s of milliseconds uncertainty in the timing.