Skip to content
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

Open
letsfire opened this issue Jun 29, 2024 · 2 comments
Open

seeking your kind assistance #983

letsfire opened this issue Jun 29, 2024 · 2 comments

Comments

@letsfire
Copy link

letsfire commented Jun 29, 2024

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

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**

Here is the log output of GP_LOG_DATA. Domain And Data Length.

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
@msmeissn
Copy link
Contributor

msmeissn commented Jul 1, 2024 via email

@letsfire
Copy link
Author

letsfire commented Jul 1, 2024

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants