Directshow - unused front camera driver? - Windows Mobile Development and Hacking General

It has come to my attention that on my kaiser, the Registry key
HKLM\Drivers\BuiltIn has 2 camera drivers defined: NullCam and CIF, but in HKLM\Software\Microsoft\DirectX\Directshow\Capture only the NullCam related entries are present.
Investigating this further, I've noticed that CIF.dll exports almost the same "interface" as NullCam.dll. By that I mean a set of Init/Start/Close functions.
So, is there a chance that kaiser's second (the front) camera too has directshow interface lurking there somewhere? Can an expert look into this? I hope this has not been covered before!
I did some experiments on my own, replacing NullCam entries with the CIF entries but without successful results...
thank you,
hypest

Related

Find dll functions from rom dll

Not sure if I have worded this properly as I'm at the edge of my knowledge but I wish to call a function that I am assuming is in a DLL which is contained in ROM. I know the name of the DLL but how can I get a list of functions available from it when I cannot copy it onto my PC?
Many Thanks
Hi Tailor.
First, what function exactly are you looking for? There may be some documentation on it somewhere.
To browse a ROM dll you need to get a ROM dump. The simplest way for your purpose, provided you have a WM5 device is to search for TESTWM5.exe by mamiac on this forum. It will dump all files to your SD. They won't be workable for coding purposes, but still good enough to use dependency walker to get exported functions from DLLs.
Unfortunately that still won't tell you the parameters the function expects. only its name.
Hi Levenum and thanks for your reply.
Its a Sony Sat Nav Windows CE 4.2 device so unforunately theres not much chance of a ROM dump or documentation. Then unit is sold as a finished product and not intended for further developement.
I have installed TomTom instead of the poor app already installed and was trying to get access to the hardware buttons and Light sensor on the unit and then intended to use the TomTom SDK to recreate their functions.
The keys don't not trigger a key press event but their are DLL's called something like powerbutton.dll and navbutton.dll and so it's a fair guess that they could be used to trigger these events.
Obviously without knowing their exported functions I'm not going to get much further.
Any further thoughts ?
Many Thanks
How exactly are you trying to catch the key events?
For what you describe, you don't just need to know function names, you need to know with what parameters to call them so this is definitely not the way to go.
If you are coding with C++ search for info on SetWindowsHook. I am not sure of its implementation on CE, but this might be what you need.
I'm using VB.Net 2005
I'll have a look at SetWindowsHook, Thanks.
Any ideas for the light sensor, there's a test app that Sony have left on the device, it gives a reading from 0 to 100?
How are they likely to be reading this value?

Kaiser (& Others) ROM Dual Camera Project {Dev Help Req.}

A few weeks ago I started skining the 5.04 Camera to look like 6.08. That was fairly successful, however the main issue, lag time, was of course not affected. I then started trying to hack AF into the 6.08 Camera version & had issues getting it to function as it relies on some different resources that I could not get functioning concurrently.
So, last night I started playing with a new idea. Renaming & resources from one of the two camera versions allowing for both cameras to be installed, having one called to initialization by a long camera keypress.
Anyone familar with widows mobile (Arm) executables & resource hacking willing to help out on this idea & test it?
Is this something people would like to see in a cooked rom? Would the ability to toggle the camera depending on what you need, Auto-Focus or Speed, be appealing?
It really wouldn't add too much weight to the ROM, as both Camera use primarily the same resources/DLL's. Would having a choice of a macro/micro (AF) mode bee something you'd like to see?
Hi man,
Realy great what you want to do but to be honest I don't like the camera atm cause the front camera isn't working with the 6.8 build (correct me if I'm wrong).
I would rather have both camera's supported on my Kaiser to use this build.
Together with the Opal dialer with videocall enabled that would be a awsom job!
Grtz,
Leo
Great Suggestion!
I have not looked into that at all, My last TYTNII is dead, so I am on a Tilt. If you are willing to give it a test since you have both cameras, I will look into implementing that as well.
BTW, I will be moving this into the Development & Hacking thread soon. I just wanted to start it here to see if any Kaiser users had any camera hacking experience or suggestions.
I would be glad to help you my friend.
Please let me know when you have something!
GSLEON3 said:
Great Suggestion!
I have not looked into that at all, My last TYTNII is dead, so I am on a Tilt. If you are willing to give it a test since you have both cameras, I will look into implementing that as well.
BTW, I will be moving this into the Development & Hacking thread soon. I just wanted to start it here to see if any Kaiser users had any camera hacking experience or suggestions.
Click to expand...
Click to collapse
I have been able to specifically locate the function handling the camera AF uysing IDA Pro, I also see that there appears to be some hard coding of FPS information/limits in the camera executable for the 5.04 Kaiser Camera.
This info is not present within the newer (Opal) camera as far as I can tell & may be a reason why it seems to outperform the Kaiser Stock Camera. There is also no information or AF calls within the Opal Camera executable. Hence, without a complete rewrite of the program I cannot simply integrate AF into the newer camera.
Lost...
Anyone???
I have tried renaming the resources & creating a new registry tree all to no Avail.
I seem to have enough resources available to operate trhe second camera, however I cannot get it to initialize. Anyone have any suggestions?
GSLEON3 said:
I have been able to specifically locate the function handling the camera AF uysing IDA Pro, I also see that there appears to be some hard coding of FPS information/limits in the camera executable for the 5.04 Kaiser Camera.
This info is not present within the newer (Opal) camera as far as I can tell & may be a reason why it seems to outperform the Kaiser Stock Camera. There is also no information or AF calls within the Opal Camera executable. Hence, without a complete rewrite of the program I cannot simply integrate AF into the newer camera.
Click to expand...
Click to collapse
Have you found many functions involved in the AF management, in the old version ? I'm a bit busy with the Dialer, but since we're both using IDA Pro, I may take a look to what you've documented so far in the IDA database... I'm not a big expert in camera apps, but who knows...
BJK
There are about 6 or so references. Both cameras use primarily the same resource files, so it appears to me that the AF function is coded into the executable.
I had pretty much given up on the addition of AF to the new 6.8 camera & had decided it would be easier for a novice like me to just add support for a second camera program.
However, that task is also throwing me at the moment. I have built a new cab, with renamed files & some hacks to point to the renamed files, I have also created a moddified registry tree to co-exist with the one for the OEM camera, yet when I select the newly moddified camera it tries to launch, but won't initialize.
Missing something somewhere...
GSLEON3 said:
There are about 6 or so references. Both cameras use primarily the same resource files, so it appears to me that the AF function is coded into the executable.
Click to expand...
Click to collapse
No external reference to a shared .dll ?
I had pretty much given up on the addition of AF to the new 6.8 camera & had decided it would be easier for a novice like me to just add support for a second camera program.
However, that task is also throwing me at the moment. I have built a new cab, with renamed files & some hacks to point to the renamed files, I have also created a moddified registry tree to co-exist with the one for the OEM camera, yet when I select the newly moddified camera it tries to launch, but won't initialize.
Click to expand...
Click to collapse
That's why I asked. It seems a single-threaded apartment issue. If it is an external .dll, maybe it could not be designed for multiple concurrency...
BJK
DupinBJK said:
No external reference to a shared .dll ?
That's why I asked. It seems a single-threaded apartment issue. If it is an external .dll, maybe it could not be designed for multiple concurrency...
BJK
Click to expand...
Click to collapse
When I get a moment I will post what I have found, the differences in the executables & the AF refernces & coding.
It may all be moot however, as I take a look at the Raphael camera, which allegedly has AF as well as a newer camera. We shall see.
GSLEON3 said:
When I get a moment I will post what I have found, the differences in the executables & the AF refernces & coding.
It may all be moot however, as I take a look at the Raphael camera, which allegedly has AF as well as a newer camera. We shall see.
Click to expand...
Click to collapse
Good, thanks !
Again, need to reiterate that arm executables are not my thing, however, I have hacked the Ralph Camera & it uses the same icons & resource (Mostly) as the Kaiser & Opal.
However when I build a new cab just to see if the AF is working already on the new Fuze ROM Camera I get an unsigned error message.
Can one of you ARM pros give me some insight?
Fuze Camera is new version & definitely has AutoFocus support!
Works with the existing hacked QVGA .mui & icon files, but when trying to create the cab I still get unsigned error.
Anyone???
Here is the start of an OEM QVGA package. Exe still won't launch.
Anyone want to take a look? Do I need to resign the app, the exe?
It includes all files & images resized & hacked for QVGA including the .mui files. The exe is throwing me badly though.
The OEM can be found here: http://rapidshare.com/files/159104147/HTC_Camera_6_Fuze_OEM_QVGA.rar
However, it seems the sensorSDK references are giving me the issues. Maybe need to find a way to null them out or default landscape.
If I'm understanding correctly, you'd like a switch to use the camera version with AF and the camera version without AF. Correct or am I completely missing something here? If I AM understanding correctly, then I would be all for this, as this would really make the camera on the Kaiser at least sort of useful, as opposed to only usable in certain conditions.
GSLEON3 said:
Here is the start of an OEM QVGA package. Exe still won't launch.
Anyone want to take a look? Do I need to resign the app, the exe?
It includes all files & images resized & hacked for QVGA including the .mui files. The exe is throwing me badly though.
The OEM can be found here: http://rapidshare.com/files/159104147/HTC_Camera_6_Fuze_OEM_QVGA.rar
However, it seems the sensorSDK references are giving me the issues. Maybe need to find a way to null them out or default landscape.
Click to expand...
Click to collapse
Sorry for being late...
Have you removed the signature before patching the files ? You have to remove it from each signed file you're going to patch, to be able to use it. I can do it for you, if you wish...
BJK
met3ora said:
If I'm understanding correctly, you'd like a switch to use the camera version with AF and the camera version without AF. Correct or am I completely missing something here? If I AM understanding correctly, then I would be all for this, as this would really make the camera on the Kaiser at least sort of useful, as opposed to only usable in certain conditions.
Click to expand...
Click to collapse
YES. That was the original intention of this thread.
DupinBJK said:
Sorry for being late...
Have you removed the signature before patching the files ? You have to remove it from each signed file you're going to patch, to be able to use it. I can do it for you, if you wish...
BJK
Click to expand...
Click to collapse
BJK, I would be eternally gratefull if you'd do that for me, then I can see if I can find a way to null out or hack a SensorSDK.DLL to aways import the landscape value as a return & maybe see if the results are succesful.
OT: gsleon03...dude im your neighbor lol...i live in Torrance and im up in PV once in a while.
id like to see this project come true
Hi
first, sorry that I interrupt this thread and asking about improvement of frame rate for shooting video throw HTC camera, am have Cruise and has low frame rate in video recording and I think that Kaiser has the same issue, am using the famous camera trick " run camera program, hiding the lens, power off devise and waiting for Sec's, then power on again" which rising the frame rate from 4 to 19 frame/sec in video shooting but with darkens pic, did any one analysis this trick and try to get solution for camera low rate problem or found why 6.08 camera is faster than 5.04
finaly i hope that see this project come true
secoseco said:
Hi
first, sorry that I interrupt this thread and asking about improvement of frame rate for shooting video throw HTC camera, am have Cruise and has low frame rate in video recording and I think that Kaiser has the same issue, am using the famous camera trick " run camera program, hiding the lens, power off devise and waiting for Sec's, then power on again" which rising the frame rate from 4 to 19 frame/sec in video shooting but with darkens pic, did any one analysis this trick and try to get solution for camera low rate problem or found why 6.08 camera is faster than 5.04
finaly i hope that see this project come true
Click to expand...
Click to collapse
I second that. ist there still any development?

[C#/C++] Camera Access with DirectShow

Hi Guys,
Because the standard API's to use the camera aren't flexible enough I need to use directshow.
Unfortunately I'm not a very good C++ programmer (more C# ;-))
I found this solution. Wich compiles a C++ DLL and can be called from C#.
Perfect! Except the C++ code doesn't really do what I want to. (And I have no idea how to change it)
See attachement for the C++ project
Dll does: Capture one frame from the camera and store it as a file. (with 320x240 resolution, not great quality)
I'd prefer to use the best available quality, or mayby choose the quality I want.
Also I'd prefer not saving/storing the file but return a stream / bitmap / image
Because I only want to show it on screen (actualy let a mobile webserver respond an image with as much frames per sec as possible)
(Saves a step, storing and deleting everytime)
Any Help?
PS. I also tried Directshow.Net Library But it doesn't seem to work on Windows Mobile.
C# Code
Btw, this is the code I use in C# to create the functions:
[DllImport("CameraCaptureDLL.DLL")]
private static extern bool CaptureStill(string Path);
[DllImport("CameraCaptureDLL.DLL")]
private static extern bool InitializeGraph(IntPtr hWnd);
Just to keep y'all posted, I'm now looking @ this solution (CodeProject.com)
They rewrote the DLL file, and I think it's gonna do what I want, but I first need to install Windows CE 5.0 wich takes alot of time....
I met same problem with you.
I just want to show the camera sight, like the Camera app's Preview function.
I don't know if there is a HTC's Camera SDK.
Please keep contract, if I have any improvment, I will tell you.
I had fun with camera but not using directshow or the preview...I'm just launching the camera app (using sample camera in SDK).
If anyone find an easy way to have "embedded camera display" in an application I'm really interested!! (like a pictureBox having camera as image source)
If I found something I'll tell...
DarkAngelFR said:
I had fun with camera but not using directshow or the preview...I'm just launching the camera app (using sample camera in SDK).
If anyone find an easy way to have "embedded camera display" in an application I'm really interested!! (like a pictureBox having camera as image source)
If I found something I'll tell...
Click to expand...
Click to collapse
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
m32 said:
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
Click to expand...
Click to collapse
Could you provide the compiled version of the htccamera dll ?
Will try to build this later (@work don't have cc compiler, just VS2008)
Thanks!
An in-memory capture would almost certainly improve the live-scan mode in Barcorama also! I could really use that in-memory capable CameraCaptureDll.dll.
Many users seem to have successfully compiled the source at http://www.codeproject.com/KB/mobile/samplegrabberfilter-wm6.aspx, but I can't find the compiled dll somewhere .
I fail to compile it myself as it needs the WindowsCE Platform Builder and VS2008...
Anybody that comes across the DLL, please share!
have fun,
hypest
Hello,
working on it ^^ I will upload the dll here later today
Here you go : download (if fails : try here)
is the source code compiled (look in /bin/Release). Tested and works nice (deploy the dll then the sample app).
Hope this helps!
Thanx!!
will try it!
UPDATE:
The sample opens up but seems to do nothing on my kaiser. <-UPDATE: wrong! it works OK.
I have managed to use the DLL directly though. The capturing works fine but the capture-stop seems to fail: the Stop() function hangs. I use the Shutdown() that seems to be OK, but then I have trouble re-initializing the whole procedure. Also, there seem to be a sensitivity on manually using the garbage collector.
Thanks again anyway!!
Cannot seem to import the dll into another project
@DarkAngelFR
Thanks very much for the sample app for video streaming, was very helpful.
However I really need to use the dll or even the import the CameraCaptureDLL c++ code into our project. I have already read over the ReadMe text file but need further help on how to create this object? Have already tried the Ignore Input Library property and that does not work sadly. Any help would be great!
Thanks,
John
m32 said:
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
Click to expand...
Click to collapse
I have build the camerasniffer dll (and called it htccamera.dll) with mingw32ce, but how do I use it?
I tried copying it to "/windows" and rebooted the phone (hermes) but I do not get a log file on the storage card. Any hints?
Thanks a lot!
Hi,
I got this error when I try to debug this application on my mobile (HTC HD2)
"An unhandled exception of type 'System.MissingMethodException' occurred in TestCameraCapture.exe
Additional information: Can't find PInvoke DLL 'CameraCaptureDLL.DLL'."
But it seem to works fine on the Emulator.
How can I test it on my mobile then?
EDIT
Problem solved, I just had to copy the 'CameraCaptureDLL.DLL' file to the folder where the application is running.

Increase zoom in album viewer

Is there any registry tweak that will allow you to zoom in closer with the album viewer software. It works great for the files I view but I need to be able to zoom in much more than it allows
Thanks
Mike
Correct me if I'm wrong, but I think you can zoom in as far as the resolution of each image allows. I have some pretty high-res photo's (taken on a digital SLR) and I can zoom in on them until I start to see pixels. If you have low-res pics, you'll start seeing pixels much sooner.
Zooming in any further would be useless since it can't add any detail, you'll just see pixels the size of Lego blocks.
Edit: I realize you may want to examine an image pixel-per-pixel for some reason. In that case, sorry, I can't help.
Thanks for your response, If I could zoom in that close it would be great. I have some hi resolution files anywhere from 6-10 MB which open fine but I can only zoom in about 3 levels. If I could go to the level you describe, it would more than meet my needs.
Hm... Maybe there is a limit after all. I must admit I haven't tried any files in the 10mb region.
I've taken a quick look in the registry but I haven't come across anything that looks like it might solve this. Sorry.
I looked in the registry too but couldn't find any reference to HTCalbum at all. Guess I'll just have to start trying all the demos of the photo apps again...
There's a bunch of stuff under 'HKLM/Software/HTC/HTCAlbum'. Maybe you can find something I overlooked there.
Thanks, don't know why Resco didn't find that ref, I thought it scanned all directories. I couldn't find anything there either. I did change a dword from 2 to 3 in wheelzoomin frames but that didn't do anything obvious so I changed it back. Wonder if HTC support might be able to help, I've read that they're quick to respond to customer software issues but since this is more of a preference issue vs buggy software they may not offer up much.
Yeah, today I copied a 78 mega pixel image (actually a map) to my Leo and to my surprise, I can't zoom more than a certain amount in HTC Album. Anyone know a fix for this?
use resco photo manager, that one allows you to zoom in much more than the htc album. The newest version also supports multi-touch!
thanx! Tried resco; I'm flattered how they implemented multi touch this soon! only a month and a half after Leo's release.
It's really nice and fast (even faster refresh time than htc album) but I wish u could disable multi touch rotation. It's constantly confusing pinch with rotation.

Sedna Fingerprint Timeout

Like a few others with the HTC P6500 (Sedna) handset. I was annoyed by the 1 minute time out on the fingerprint security, which could not be adjusted easily. After looking at the registry etc further, I believe I have extended my timeout to 5 mins with the following registry adjustments.
Edit these values here:
HKLM\Comm\Security\Policy\LASSD\AE\{50C13377-C66D-400C-889E-C316FC4AB374}
AEFrequencyType - set to 2
(This calls AEFrequencyValue (below) which represents the number of minutes since any AE returned from VerifyUser successfully.)
AEFrequencyValue – set to 5
(Number of mins to delay timeout)
Then - Soft reboot the device[/B]
Initial tests appear that this works ok on my handset.
Reference: msdn.microsoft.com/en-us/library/aa919751.aspx
Reference: channel9.msdn.com/wiki/MobileDeveloper/CreatingALap/
This post is for information only. I am not responsible for damage caused to your own handset. I am also not a developer, just someone who knows a little about computers etc. I hope that people find this information useful.
Thanks for the info but where is the "HKLM" folder to start with ?
Registry folder
Hi Chayen22,
You will need to install a registry editor onto the handset to access these settings. Have a look around on the forums to see what people use. I use one called Total Commander which also has many other useful features and tools.
If you are unsure of what you are doing it may be best speaking to someone you know who is good with Windows based computers. I'll also take this opportunity to say that I'll accept no responsibility for any damage caused when using registry editing tools on your phone. You make changes at your own risk.
I hope you find this info useful.
Stretch_y2k

Categories

Resources