.Net MTP / PTP Wrapper?
Asked Answered
C

1

10

I'm writting a hobby project to deal with files on cameras. Previously I found issues with the camera and the FolderBrowserDialog.

What I believe is happing is that the camera is using MTP or PTP (Picture Transfer Protocol not peer-to-peer).

In order to make interfacing with the camera more seamless I'd like to use PTP or MTP to access the camera. Are there any MTP / PTP Wrappers for .Net people can recommend? I'm keen to avoid writing my own or dabbling in unmanaged code if possible.

Cattycornered answered 15/5, 2009 at 10:14 Comment(0)
F
3

I have found this blog post by dimeby8 which has been a great starting point with a lot of useful information about how the protocol works, however it leaves a lot to be desired in the way of managed implementations

http://blogs.msdn.com/dimeby8/archive/tags/C_2300_/default.aspx

I have also found a crude C++/CLI MTP wrapper- it has next to no functionality but is a good demonstration of mixed managed/unmanged code:

http://ko.sourceforge.jp/projects/sfnet_mtpsharp/

And there's a CodePlex project but it doesn't demonstrate transfers or - what I'm interested in- editing camera metadata (specifically the camera date)

http://www.codeplex.com/portabledevicelib/

Have you had any success with this project?

Frequentative answered 3/3, 2010 at 17:40 Comment(2)
Thanks for the advice. I haven't had much time to continue working on this side project. I've been too busy! When you say camera date, do you mean the date/time the camera is set to? Or the date/time of the files it saves. If it's the latter, I suggest you give Exif Tool a look into - sno.phy.queensu.ca/~phil/exiftoolCattycornered
Unfortunately, it's the former. I have some manged code (a translation of dimeby8's posts blogs.msdn.com/dimeby8/archive/2006/10/13/… ) but when I execute it with 2 different point and shoot cameras I get success on the method calls but different versions of "not supported" as the return code from the camera :( If you're looking for a managed version of that code I'd be happy to share it. Also, re: Exif, check out codeproject.com/KB/list/imagelistview.aspx -awesome .net listview plus excellent managed Exif wrapperFrequentative

© 2022 - 2024 — McMap. All rights reserved.