-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seeking your kind assistance #983
Comments
On Sat, Jun 29, 2024 at 11:51:28AM -0700, letsfire wrote:
```C
char* data;
unsigned long int size = 1000;
CameraFile* file;
gp_file_new(&file);
CHECK_RESULT(gp_camera_file_get(camera, folder, name, GP_FILE_TYPE_NORMAL, file, context));
CHECK_RESULT(gp_file_get_data_and_size(file, &data, &size));
```
Why is the size correct, but the length of the data is only 10 bytes? I am use ptp2 (camlib) and libusb (port) in android with Canon EOS 60D
Where do you see the 10 bytes? The "����:\Exif" string?
The data returned here is in binary format, not a string, so do not use strlen or so
for displaying.
Ciao, Marcus
…
I/USB_CAMERA(11940): 5256827 - **the size of gp_file_get_data_and_size**
I/USB_CAMERA(11940): ����:\Exif - **the data of gp_file_get_data_and_size**
I/USB_CAMERA(11940): Domain:gp_filesystem_get_file_impl, Data Len: 73
I/USB_CAMERA(11940): Domain:ptp, Data Len: 39
I/USB_CAMERA(11940): Domain:ptp, Data Len: 39
I/USB_CAMERA(11940): Domain:ptp, Data Len: 39
I/USB_CAMERA(11940): Domain:get_file_func, Data Len: 28
I/USB_CAMERA(11940): Domain:ptp_usb_sendreq, Data Len: 79
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 34
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 199
I/USB_CAMERA(11940): Domain:ptp_usb_getdata, Data Len: 50
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 4670
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2359364
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2354756
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 35
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 128
I/USB_CAMERA(11940): Domain:ptp_usb_getresp, Data Len: 54
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 141
I/USB_CAMERA(11940): Domain:ptp_usb_sendreq, Data Len: 84
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 34
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 199
I/USB_CAMERA(11940): Domain:ptp_usb_getdata, Data Len: 50
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 4670
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2359364
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2354756
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 35
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 128
I/USB_CAMERA(11940): Domain:ptp_usb_getresp, Data Len: 54
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 141
I/USB_CAMERA(11940): Domain:ptp_usb_sendreq, Data Len: 84
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 34
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 199
I/USB_CAMERA(11940): Domain:ptp_usb_getdata, Data Len: 50
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 4670
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2359364
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2354756
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 35
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 128
I/USB_CAMERA(11940): Domain:ptp_usb_getresp, Data Len: 54
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 141
I/USB_CAMERA(11940): Domain:ptp_usb_sendreq, Data Len: 84
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 34
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 199
I/USB_CAMERA(11940): Domain:ptp_usb_getdata, Data Len: 50
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 4670
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2359364
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2354756
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 35
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 128
I/USB_CAMERA(11940): Domain:ptp_usb_getresp, Data Len: 54
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 141
I/USB_CAMERA(11940): Domain:ptp_usb_sendreq, Data Len: 84
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 34
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 199
I/USB_CAMERA(11940): Domain:ptp_usb_getdata, Data Len: 50
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 4670
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2359364
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 43
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 2354756
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 35
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 128
I/USB_CAMERA(11940): Domain:ptp_usb_getresp, Data Len: 54
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 141
I/USB_CAMERA(11940): Domain:ptp_usb_sendreq, Data Len: 82
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 34
I/USB_CAMERA(11940): Domain:gp_port_write, Data Len: 199
I/USB_CAMERA(11940): Domain:ptp_usb_getdata, Data Len: 50
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 4670
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 41
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 57665
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 37
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 707
I/USB_CAMERA(11940): Domain:ptp_usb_getresp, Data Len: 54
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 39
I/USB_CAMERA(11940): Domain:gp_port_read, Data Len: 141
--
Reply to this email directly or view it on GitHub:
#983
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
Marcus Meissner (he/him), Distinguished Engineer / Senior Project Manager Security
SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew McDonald, Werner Knoblich, HRB 36809, AG Nuernberg
|
Thank you. With your reminder, I have resolved my issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is the size correct, but the length of the data is only 10 bytes? I am use ptp2 (camlib) and libusb (port) in android with Canon EOS 60D
Here is the log output of GP_LOG_DATA. Domain And Data Length.
The text was updated successfully, but these errors were encountered: