• R/O
  • HTTP
  • SSH
  • HTTPS

PKRemote: Commit

Pentax DSLR Remote Control app.


Commit MetaInfo

Revision2a300c58e5e19d00ee572b7c8d392abe89b0eb63 (tree)
Zeit2019-10-13 14:17:56
AutorMRSa <mrsa@myad...>
CommiterMRSa

Log Message

これでできた感。(Full Image取得)

Ändern Zusammenfassung

Diff

--- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/PtpIpCommandPublisher.java
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/PtpIpCommandPublisher.java
@@ -436,6 +436,7 @@ public class PtpIpCommandPublisher implements IPtpIpCommandPublisher, IPtpIpComm
436436
437437 try
438438 {
439+ Log.v(TAG, " ===== receive_multi() =====");
439440 int receive_message_buffer_size = BUFFER_SIZE;
440441 byte[] byte_array = new byte[receive_message_buffer_size];
441442 InputStream is = socket.getInputStream();
@@ -518,7 +519,7 @@ public class PtpIpCommandPublisher implements IPtpIpCommandPublisher, IPtpIpComm
518519 lenlen = ((((int) byte_array[15]) & 0xff) << 24) + ((((int) byte_array[14]) & 0xff) << 16) + ((((int) byte_array[13]) & 0xff) << 8) + (((int) byte_array[12]) & 0xff);
519520 packetType = (((int)byte_array[16]) & 0xff);
520521 }
521- Log.v(TAG, " --- [[[ RECEIVED LARGE BLOCK MESSAGE : " + lenlen + " bytes. ]]] --- TYPE : " + packetType);
522+ Log.v(TAG, " --- parseDataLength() length: " + lenlen + " TYPE: " + packetType + " read_bytes: " + read_bytes);
522523 }
523524 catch (Exception e)
524525 {
@@ -546,7 +547,7 @@ public class PtpIpCommandPublisher implements IPtpIpCommandPublisher, IPtpIpComm
546547 lenlen = ((((int) byte_array[15]) & 0xff) << 24) + ((((int) byte_array[14]) & 0xff) << 16) + ((((int) byte_array[13]) & 0xff) << 8) + (((int) byte_array[12]) & 0xff);
547548 packetType = (((int) byte_array[16]) & 0xff);
548549 }
549- Log.v(TAG, " --- <<< RECEIVED LARGE BLOCK MESSAGE : " + len + " bytes. (" + byte_array.length + " bytes.)" + " lenlen : " + lenlen + " >>> --- TYPE : " + packetType);
550+ Log.v(TAG, " --- RECEIVED MESSAGE : " + len + " bytes (BUFFER: " + byte_array.length + " bytes)" + " length : " + lenlen + " TYPE : " + packetType + " --- ");
550551 if (lenlen == 0)
551552 {
552553 // データとしては変なので、なにもしない
--- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/PtpIpFullImageReceiver.java
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/PtpIpFullImageReceiver.java
@@ -61,10 +61,12 @@ public class PtpIpFullImageReceiver implements IPtpIpCommandCallback
6161 }
6262 else if (id == objectId + 2)
6363 {
64- Log.v(TAG, " RECEIVED : " + id);
64+ Log.v(TAG, " TransferComplete() RECEIVED : " + id + " (" + objectId + ") size : " + target_image_size);
6565
6666 // end of receive sequence.
6767 callback.onCompleted();
68+ received_remain_bytes = 0;
69+ received_total_bytes = 0;
6870 target_image_size = 0;
6971 objectId = 0;
7072 callback = null;
@@ -90,7 +92,7 @@ public class PtpIpFullImageReceiver implements IPtpIpCommandCallback
9092 // 受信したデータから、通信のヘッダ部分を削除する
9193 byte[] body = cutHeader(rx_body);
9294 int length = (body == null) ? 0 : body.length;
93- Log.v(TAG, " onReceiveProgress() " + currentBytes + "/" + totalBytes + " (" + length + " bytes.) : image : " + target_image_size);
95+ Log.v(TAG, " onReceiveProgress() " + currentBytes + "/" + totalBytes + " (" + length + " bytes.)");
9496 callback.onProgress(body, length, new IProgressEvent() {
9597 @Override
9698 public float getProgress() {
@@ -120,6 +122,8 @@ public class PtpIpFullImageReceiver implements IPtpIpCommandCallback
120122 {
121123 // データを最初に読んだとき。ヘッダ部分を読み飛ばす
122124 data_position = (int) rx_body[0] & (0xff);
125+ Log.v(TAG, " FIRST DATA POS. : " + data_position);
126+ //SimpleLogDumper.dump_bytes(" [sss]", Arrays.copyOfRange(rx_body, 0, (64)));
123127 }
124128 else if (received_remain_bytes > 0)
125129 {
Show on old repository browser