gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
991 stars 317 forks source link

How do i get sony event callback? #921

Closed OnClickListener2048 closed 10 months ago

OnClickListener2048 commented 10 months ago

Hi Marcus, I am using ILCE-7M3 sony model and i got some problem using libgphoto to control it, now i check it out and did't find check event operator this is the mo sony model operator: 08-22 00:36:58.030 PtpCamera I OperationsSupported: 9320 08-22 00:36:58.030 PtpCamera I GetDeviceInfo(0x1001) 9320 08-22 00:36:58.030 PtpCamera I OpenSession(0x1002) 9320 08-22 00:36:58.030 PtpCamera I CloseSession(0x1003) 9320 08-22 00:36:58.030 PtpCamera I GetStorageIDs(0x1004) 9320 08-22 00:36:58.030 PtpCamera I GetStorageInfo(0x1005) 9320 08-22 00:36:58.030 PtpCamera I GetNumObjects(0x1006) 9320 08-22 00:36:58.030 PtpCamera I GetObjectHandles(0x1007) 9320 08-22 00:36:58.030 PtpCamera I GetObjectInfo(0x1008) 9320 08-22 00:36:58.030 PtpCamera I GetObject(0x1009) 9320 08-22 00:36:58.030 PtpCamera I GetThumb(0x100a) 9320 08-22 00:36:58.030 PtpCamera I GetPartialObject(0x101b) 9320 08-22 00:36:58.030 PtpCamera I (0x9201) 9320 08-22 00:36:58.030 PtpCamera I (0x9202) 9320 08-22 00:36:58.030 PtpCamera I (0x9205) 9320 08-22 00:36:58.030 PtpCamera I (0x9207) 9320 08-22 00:36:58.030 PtpCamera I 0x9209 9320 08-22 00:36:58.030 PtpCamera I EventsSupported: 9320 08-22 00:36:58.030 PtpCamera I 0xc201 9320 08-22 00:36:58.030 PtpCamera I 0xc202 9320 08-22 00:36:58.030 PtpCamera I 0xc203

sony models didn't like any others, like nikon they have 0x90C7 to know it takes a photo and i checked your code image I still don't know how you get the event here.

msmeissn commented 10 months ago

you get ptp events, the 0xc201, 0xc202, 0xc203:

ptp.h:#define PTP_EC_Sony_ObjectAdded 0xC201 ptp.h:#define PTP_EC_Sony_ObjectRemoved 0xC202 ptp.h:#define PTP_EC_Sony_PropertyChanged 0xC203

the come via specific PTP USB events.