colealanroberts / OpenAlpha

A Swift package for retrieving images from Sony digital cameras
MIT License
126 stars 2 forks source link

Question about confirming supported Models #1

Closed dezinezync closed 1 year ago

dezinezync commented 1 year ago

Hi Cole,

I own an A7-MIII and would love to contribute compatibility of the camera with this library. I'll be working out the code sometime over the weekends.

Do you have a checklist for confirming full/partial compatibility with cameras?

That would streamline the process for adding new cameras to list.

Sorry, if this is already included/mentioned somewhere and I missed it.

colealanroberts commented 1 year ago

Hi Nikhil,

Thanks for wanting to confirm the compatibility of the MIII! I've added a Confirming Compatibility entry to the Wiki.

Please let me know if you have any further questions.

Thanks!

colealanroberts commented 1 year ago

@dezinezync Were you able to get the demo project running?

dezinezync commented 1 year ago

@colealanroberts Hi Cole, sorry for the delay on this. I'll post my findings shortly.

dezinezync commented 1 year ago

@colealanroberts Unfortunately, it did not work. Crashed here:

image

I'll clone the library to local and investigate this further. Any suggestions/clues what the value http-get:*:image/jpeg:* should be mapped to?

I'll be happy to test further and open a PR with fixes.

colealanroberts commented 1 year ago

@dezinezync Interesting, I appreciate your help!

Can you set a breakpoint on L46 in MediaProvider.swift and share the result of po response?

dezinezync commented 1 year ago
<?xml version="1.0" encoding="UTF-8"?>
<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:arib="urn:schemas-arib-or-jp:elements-1-0/" xmlns:av="urn:schemas-sony-com:av" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">
    <item id="04_03_0532523776_000015_000012_000001" restricted="1" parentID="03_02_0532523776_000015_000012_000000">
        <dc:title>_DSC6968.JPG</dc:title>
        <upnp:class>object.item.imageItem.photo</upnp:class>
        <av:contentType>STILL</av:contentType>
        <dc:date>2023-01-10T17:51:48</dc:date>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_CI=1">http://192.168.122.1:60151/LRG__DSC6968.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000001%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fLRG%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1">http://192.168.122.1:60151/SM__DSC6968.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000001%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fSM%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1">http://192.168.122.1:60151/TN__DSC6968.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000001%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fTN%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:*" size="5242880" resolution="6000x4000">http://192.168.122.1:60151/ORG__DSC6968.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000001%21http%2dget%3a%2a%3aimage%2fjpeg%3a%2a%215242880%21%21%21%21</res>
    </item>
    <item id="04_03_0532523776_000015_000012_000002" restricted="1" parentID="03_02_0532523776_000015_000012_000000">
        <dc:title>_DSC6969.JPG</dc:title>
        <upnp:class>object.item.imageItem.photo</upnp:class>
        <av:contentType>STILL</av:contentType>
        <dc:date>2023-01-10T17:51:48</dc:date>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_CI=1">http://192.168.122.1:60151/LRG__DSC6969.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000002%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fLRG%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1">http://192.168.122.1:60151/SM__DSC6969.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000002%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fSM%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1">http://192.168.122.1:60151/TN__DSC6969.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000002%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fTN%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:*" size="5242880" resolution="6000x4000">http://192.168.122.1:60151/ORG__DSC6969.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000002%21http%2dget%3a%2a%3aimage%2fjpeg%3a%2a%215242880%21%21%21%21</res>
    </item>
    <item id="04_03_0532523776_000015_000012_000003" restricted="1" parentID="03_02_0532523776_000015_000012_000000">
        <dc:title>_DSC6970.JPG</dc:title>
        <upnp:class>object.item.imageItem.photo</upnp:class>
        <av:contentType>STILL</av:contentType>
        <dc:date>2023-01-10T17:51:48</dc:date>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_CI=1">http://192.168.122.1:60151/LRG__DSC6970.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000003%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fLRG%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1">http://192.168.122.1:60151/SM__DSC6970.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000003%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fSM%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1">http://192.168.122.1:60151/TN__DSC6970.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000003%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fTN%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
        <res protocolInfo="http-get:*:image/jpeg:*" size="5242880" resolution="6000x4000">http://192.168.122.1:60151/ORG__DSC6970.JPG?%2104%5f03%5f0532523776%5f000015%5f000012%5f000003%21http%2dget%3a%2a%3aimage%2fjpeg%3a%2a%215242880%21%21%21%21</res>
    </item>
</DIDL-Lite>
Printing description of response:
(OpenAlpha.DLNA.BrowseAction.Response) response = 5423 bytes

Based on this information, I'm guessing the asset in question is the JPEG from a JPEG+RAW capture setup?

colealanroberts commented 1 year ago

@dezinezync Thanks for sending this! Can you pull down the branch (cole/unit-tests-and-a7m3-support) from this PR and confirm if this works on your A7-M3?

I've also included some much-needed unit tests.

Please don't hesitate to make suggestions/a PR if you find anything while testing.

dezinezync commented 1 year ago

Success... 🎉

I haven't had a chance to go through the PR yet, I'll do so shortly. Thank you for the quick fix.

colealanroberts commented 1 year ago

Excellent, glad to hear that it's working!