• R/O
  • HTTP
  • SSH
  • HTTPS

PKRemote: Commit

Pentax DSLR Remote Control app.


Commit MetaInfo

Révision02a8162a8e8cf2a7c9bf6c29bb7d84efda890fc1 (tree)
l'heure2021-01-02 20:58:35
AuteurMRSa <mrsa@myad...>
CommiterMRSa

Message de Log

IXY210でスモール画像を取得できるようにする。(スモール画像取得シーケンス TYPE1)

Change Summary

Modification

--- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/messages/specific/CanonRequestInnerDevelopStart.java
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/messages/specific/CanonRequestInnerDevelopStart.java
@@ -17,7 +17,18 @@ public class CanonRequestInnerDevelopStart extends PtpIpCommandBase
1717 private final byte data2;
1818 private final byte data3;
1919
20- public CanonRequestInnerDevelopStart(@NonNull IPtpIpCommandCallback callback, int id, boolean isDumpLog, int holdId, int objectId)
20+ private final byte data4;
21+ private final byte data5;
22+ private final byte data6;
23+ private final byte data7;
24+
25+ private final byte data8;
26+ private final byte data9;
27+ private final byte dataA;
28+ private final byte dataB;
29+
30+
31+ public CanonRequestInnerDevelopStart(@NonNull IPtpIpCommandCallback callback, int id, boolean isDumpLog, int holdId, int objectId, int dataX, int dataY)
2132 {
2233 this.callback = callback;
2334 this.isDumpLog = isDumpLog;
@@ -28,6 +39,17 @@ public class CanonRequestInnerDevelopStart extends PtpIpCommandBase
2839 data1 = ((byte)((0x0000ff00 & objectId) >> 8));
2940 data2 = ((byte)((0x00ff0000 & objectId) >> 16));
3041 data3 = ((byte)((0xff000000 & objectId) >> 24));
42+
43+ data4 = ((byte) (0x000000ff & dataX));
44+ data5 = ((byte)((0x0000ff00 & dataX) >> 8));
45+ data6 = ((byte)((0x00ff0000 & dataX) >> 16));
46+ data7 = ((byte)((0xff000000 & dataX) >> 24));
47+
48+ data8 = ((byte) (0x000000ff & dataY));
49+ data9 = ((byte)((0x0000ff00 & dataY) >> 8));
50+ dataA = ((byte)((0x00ff0000 & dataY) >> 16));
51+ dataB = ((byte)((0xff000000 & dataY) >> 24));
52+
3153 }
3254
3355 @Override
@@ -101,8 +123,8 @@ public class CanonRequestInnerDevelopStart extends PtpIpCommandBase
101123 (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
102124
103125 // data
104- (byte) 0x0f, (byte) 0x00, (byte) 0x00, (byte) 0x00,
105- (byte) 0x02, (byte) 0x00, (byte) 0x00, (byte) 0x00,
126+ data4, data5, data6, data7,
127+ data8, data9, dataA, dataB,
106128 });
107129 }
108130
@@ -124,5 +146,4 @@ public class CanonRequestInnerDevelopStart extends PtpIpCommandBase
124146 return (false);
125147 }
126148
127-
128149 }
--- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonPlaybackControl.java
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonPlaybackControl.java
@@ -74,13 +74,13 @@ public class CanonPlaybackControl implements IPlaybackControl
7474 this.activity = activity;
7575 this.provider = provider;
7676 this.fullImageReceiver = new CanonFullImageReceiver(activity, provider.getCommandPublisher());
77- if (smallImageSequence == 1)
77+ if (smallImageSequence == 2)
7878 {
79- this.smallImageReciever = new CanonReducedImageReceiver(activity, provider.getCommandPublisher());
79+ this.smallImageReciever = new CanonReducedImageReceiver(activity, provider.getCommandPublisher(), smallImageSequence);
8080 }
8181 else
8282 {
83- this.smallImageReciever = new CanonSmallImageReceiver(activity, provider.getCommandPublisher());
83+ this.smallImageReciever = new CanonSmallImageReceiver(activity, provider.getCommandPublisher(), smallImageSequence);
8484 }
8585 canonImageObjectReceiver = new CanonImageObjectReceiver(provider, delayMs);
8686 }
@@ -147,7 +147,7 @@ public class CanonPlaybackControl implements IPlaybackControl
147147
148148 // 画像を取得する
149149 CanonScreennailImageReceiver receiver = new CanonScreennailImageReceiver(activity, objectId, publisher, callback);
150- publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId)); // 0x9141 : RequestInnerDevelopStart
150+ publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x0f, 0x02)); // 0x9141 : RequestInnerDevelopStart
151151 }
152152 }
153153 catch (Exception e)
--- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonReducedImageReceiver.kt
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonReducedImageReceiver.kt
@@ -4,6 +4,7 @@ import android.app.Activity
44 import android.util.Log
55 import net.osdn.gokigen.pkremote.camera.interfaces.playback.IDownloadContentCallback
66 import net.osdn.gokigen.pkremote.camera.interfaces.playback.IProgressEvent
7+import net.osdn.gokigen.pkremote.camera.utils.SimpleLogDumper
78 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandCallback
89 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandPublisher
910 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.PtpIpCommandCanonGetPartialObject
@@ -11,8 +12,9 @@ import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.Pt
1112 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.CanonRequestInnerDevelopEnd
1213 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.CanonRequestInnerDevelopStart
1314 import java.io.ByteArrayOutputStream
15+import java.util.*
1416
15-class CanonReducedImageReceiver(private val activity: Activity, private val publisher: IPtpIpCommandPublisher) : IPtpIpCommandCallback, ICanonSmallImageReceiver
17+class CanonReducedImageReceiver(private val activity: Activity, private val publisher: IPtpIpCommandPublisher, private val sequenceType : Int) : IPtpIpCommandCallback, ICanonSmallImageReceiver
1618 {
1719 private val mine = this
1820
@@ -36,6 +38,9 @@ class CanonReducedImageReceiver(private val activity: Activity, private val publ
3638 }
3739 this.callback = callback
3840 this.objectId = objectId
41+
42+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 11, false, objectId, 0x911b, 4, 0x00)) // 0x911b : SetUILock
43+/*
3944 publisher.enqueueCommand(CanonRequestInnerDevelopStart(object : IPtpIpCommandCallback {
4045 override fun receivedMessage(id: Int, rx_body: ByteArray?) {
4146 Log.v(TAG, " getRequestStatusEvent : $objectId " + (rx_body?.size ?: 0))
@@ -44,6 +49,7 @@ class CanonReducedImageReceiver(private val activity: Activity, private val publ
4449 override fun onReceiveProgress(currentBytes: Int, totalBytes: Int, rx_body: ByteArray?) { }
4550 override fun isReceiveMulti(): Boolean { return (false) }
4651 }, objectId, false, objectId, objectId)) // 0x9141 : RequestInnerDevelopStart
52+*/
4753 }
4854
4955 override fun receivedMessage(id: Int, rx_body: ByteArray?)
@@ -68,7 +74,26 @@ class CanonReducedImageReceiver(private val activity: Activity, private val publ
6874 (objectId + 4) -> {
6975 // 画像取得終了
7076 Log.v(TAG, " ----- SMALL IMAGE RECEIVE SEQUENCE FINISHED : $objectId")
71- callback!!.onCompleted()
77+ callback?.onCompleted()
78+ objectId = 0
79+ callback = null
80+ receivedTotalBytes = 0
81+ receivedRemainBytes = 0
82+ receivedFirstData = false
83+ System.gc()
84+ }
85+ (objectId + 11) -> {
86+ requestReducedObject()
87+ }
88+ (objectId + 12) -> {
89+ receivedReducedObject(rx_body)
90+ }
91+ (objectId + 13) -> {
92+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 14, false, objectId, 0x911c)) // 0x911c : ResetUILock
93+ }
94+ (objectId + 14) -> {
95+ Log.v(TAG, " ----- SMALL IMAGE RECEIVE SEQUENCE(0x911c) FINISHED : $objectId")
96+ callback?.onCompleted()
7297 objectId = 0
7398 callback = null
7499 receivedTotalBytes = 0
@@ -76,8 +101,8 @@ class CanonReducedImageReceiver(private val activity: Activity, private val publ
76101 receivedFirstData = false
77102 System.gc()
78103 }
79- (objectId + 5) -> {
80- requestGetPartialObject(rx_body)
104+ (objectId + 6) -> {
105+ Log.v(TAG, " RECEIVED 0x9141 reply.")
81106 }
82107 else -> {
83108 Log.v(TAG, " RECEIVED UNKNOWN ID : $id")
@@ -187,11 +212,15 @@ class CanonReducedImageReceiver(private val activity: Activity, private val publ
187212
188213 private fun requestGetPartialObject(rx_body: ByteArray?) {
189214 Log.v(TAG, " requestGetPartialObject() : $objectId")
215+ if (rx_body != null)
216+ {
217+ SimpleLogDumper.dump_bytes(" requestGetPartialObject ", Arrays.copyOfRange(rx_body, 0, 64))
218+ }
190219 isReceiveMulti = true
191220 receivedFirstData = false
192221
193222 // 0x9107 : GetPartialObject (元は 0x00020000)
194- val pictureLength: Int
223+ var pictureLength: Int
195224 if (rx_body != null && rx_body.size > 52) {
196225 val dataIndex = 48
197226 pictureLength = (rx_body[dataIndex].toUByte().toInt() and 0xff) + (rx_body[dataIndex + 1].toUByte().toInt() and 0xff shl 8) + (rx_body[dataIndex + 2].toUByte().toInt() and 0xff shl 16) + (rx_body[dataIndex + 3].toUByte().toInt() and 0xff shl 24)
@@ -200,9 +229,33 @@ class CanonReducedImageReceiver(private val activity: Activity, private val publ
200229 {
201230 pictureLength = 0x020000
202231 }
232+ if ((pictureLength <= 0)&&(pictureLength > 0x020000))
233+ {
234+ pictureLength = 0x020000
235+ }
236+ Log.v(TAG, " requestGetPartialObject() size : $pictureLength ")
203237 publisher.enqueueCommand(PtpIpCommandCanonGetPartialObject(this, objectId + 1, false, objectId, 0x01, 0x00, pictureLength, pictureLength))
204238 }
205239
240+ private fun requestReducedObject()
241+ {
242+ Log.v(TAG, " requestReducedObject() : $objectId size : 0x00200000 ")
243+ isReceiveMulti = true
244+ receivedFirstData = false
245+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 12, true, objectId, 0x916f, 12, objectId, 0x00200000, 0x00)) // 0x916f : GetReducedObject
246+ }
247+
248+ private fun receivedReducedObject(rx_body: ByteArray?)
249+ {
250+ Log.v(TAG, " receivedReducedObject() : $objectId")
251+ if (rx_body != null)
252+ {
253+ SimpleLogDumper.dump_bytes(" receivedReducedObject ", Arrays.copyOfRange(rx_body, 0, 64))
254+ }
255+ isReceiveMulti = false
256+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 13, true, objectId, 0x9177, 8, objectId, 0x00)) // 0x9177 : NotifySaveComplete
257+ }
258+
206259 private fun sendTransferComplete(rx_body: ByteArray?)
207260 {
208261 Log.v(TAG, " sendTransferComplete(), id : $objectId size: " + (rx_body?.size ?: 0))
--- /dev/null
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonSmallImageReceiver.kt
@@ -0,0 +1,238 @@
1+package net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.playback
2+
3+import android.app.Activity
4+import android.util.Log
5+import net.osdn.gokigen.pkremote.camera.interfaces.playback.IDownloadContentCallback
6+import net.osdn.gokigen.pkremote.camera.interfaces.playback.IProgressEvent
7+import net.osdn.gokigen.pkremote.camera.utils.SimpleLogDumper
8+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandCallback
9+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandPublisher
10+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.PtpIpCommandCanonGetPartialObject
11+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.PtpIpCommandGeneric
12+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.CanonRequestInnerDevelopEnd
13+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.CanonRequestInnerDevelopStart
14+import java.io.ByteArrayOutputStream
15+import java.util.*
16+
17+class CanonSmallImageReceiver(private val activity: Activity, private val publisher: IPtpIpCommandPublisher, private val sequenceType : Int) : IPtpIpCommandCallback, ICanonSmallImageReceiver
18+{
19+ private val mine = this
20+ private val isDumpLog = false
21+
22+ private var callback: IDownloadContentCallback? = null
23+ private var objectId = 0
24+ private var isReceiveMulti = false
25+ private var receivedFirstData = false
26+ private var receivedTotalBytes = 0
27+ private var receivedRemainBytes = 0
28+
29+ override fun issueCommand(objectId: Int, callback: IDownloadContentCallback?)
30+ {
31+ Log.v(TAG, " issueCommand() : $objectId")
32+ if (this.objectId != 0)
33+ {
34+ // already issued
35+ Log.v(TAG, " COMMAND IS ALREADY ISSUED. : $objectId")
36+ return
37+ }
38+ this.callback = callback
39+ this.objectId = objectId
40+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 7, isDumpLog, objectId, 0x902f))
41+ }
42+
43+ override fun receivedMessage(id: Int, rx_body: ByteArray?)
44+ {
45+ try
46+ {
47+ when (id)
48+ {
49+ (objectId + 7) -> {
50+ if (sequenceType == 1)
51+ {
52+ publisher.enqueueCommand(CanonRequestInnerDevelopStart(this, objectId + 8, isDumpLog, objectId, objectId, 0x06, 0x02)) // 0x9141 : RequestInnerDevelopStart
53+ }
54+ else
55+ {
56+ publisher.enqueueCommand(CanonRequestInnerDevelopStart(this, objectId + 8, isDumpLog, objectId, objectId, 0x0f, 0x02)) // 0x9141 : RequestInnerDevelopStart
57+ }
58+ }
59+ (objectId + 1) -> {
60+ sendTransferComplete(rx_body)
61+ }
62+ (objectId + 2) -> {
63+ Log.v(TAG, " requestInnerDevelopEnd() : $objectId")
64+ publisher.enqueueCommand(CanonRequestInnerDevelopEnd(this, objectId + 3, isDumpLog, objectId)) // 0x9143 : RequestInnerDevelopEnd
65+ }
66+ (objectId + 3) -> {
67+ // リセットコマンドを送ってみる
68+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 4, isDumpLog, objectId, 0x902f))
69+ }
70+ (objectId + 4) -> {
71+ // 画像取得終了
72+ Log.v(TAG, " ----- SMALL IMAGE RECEIVE SEQUENCE FINISHED : $objectId")
73+ callback?.onCompleted()
74+ objectId = 0
75+ callback = null
76+ receivedTotalBytes = 0
77+ receivedRemainBytes = 0
78+ receivedFirstData = false
79+ System.gc()
80+ }
81+ (objectId + 5) -> {
82+ requestGetPartialObject(rx_body)
83+ }
84+ (objectId + 8) -> {
85+ checkReplyInnerDevelopStart(rx_body)
86+ }
87+ else -> {
88+ Log.v(TAG, " RECEIVED UNKNOWN ID : $id")
89+ }
90+ }
91+ }
92+ catch (e: Exception)
93+ {
94+ e.printStackTrace()
95+ callback?.onErrorOccurred(e)
96+ }
97+ }
98+
99+ override fun onReceiveProgress(currentBytes: Int, totalBytes: Int, rx_body: ByteArray?)
100+ {
101+ val body = cutHeader(rx_body)
102+ val length = body?.size ?: 0
103+ Log.v(TAG, " onReceiveProgress() $currentBytes/$totalBytes ($length bytes.)")
104+ callback?.onProgress(body, length, object : IProgressEvent
105+ {
106+ override fun getProgress(): Float { return (currentBytes.toFloat() / totalBytes.toFloat()) }
107+ override fun isCancellable(): Boolean { return (false) }
108+ override fun requestCancellation() { }
109+ })
110+ }
111+
112+ private fun cutHeader(rx_body: ByteArray?): ByteArray?
113+ {
114+ if (rx_body == null)
115+ {
116+ return (null)
117+ }
118+ val length = rx_body.size
119+ var dataPosition = 0
120+ val byteStream = ByteArrayOutputStream()
121+ if (!receivedFirstData)
122+ {
123+ // 初回データを読み込んだ
124+ receivedFirstData = true
125+
126+ // データを最初に読んだとき。ヘッダ部分を読み飛ばす
127+ dataPosition = rx_body[0].toUByte().toInt() and 0xff
128+ }
129+ else if (receivedRemainBytes > 0)
130+ {
131+ //Log.v(TAG, " >>> [ remain_bytes : " + received_remain_bytes + "] ( length : " + length + ") " + data_position);
132+ //SimpleLogDumper.dump_bytes("[zzz]", Arrays.copyOfRange(rx_body, data_position, (data_position + 160)));
133+
134+ // データの読み込みが途中だった場合...
135+ if (length < receivedRemainBytes)
136+ {
137+ // 全部コピーする、足りないバイト数は残す
138+ receivedRemainBytes = receivedRemainBytes - length
139+ receivedTotalBytes = receivedTotalBytes + rx_body.size
140+ return rx_body
141+ }
142+ else
143+ {
144+ byteStream.write(rx_body, dataPosition, receivedRemainBytes)
145+ dataPosition = receivedRemainBytes
146+ receivedRemainBytes = 0
147+ }
148+ }
149+ while (dataPosition <= length - 12)
150+ {
151+ val bodySize: Int = (rx_body[dataPosition].toUByte().toInt() and 0xff) + (rx_body[dataPosition + 1].toUByte().toInt() and 0xff shl 8) + (rx_body[dataPosition + 2].toUByte().toInt() and 0xff shl 16) + (rx_body[dataPosition + 3].toUByte().toInt() and 0xff shl 24)
152+ if (bodySize <= 12)
153+ {
154+ Log.v(TAG, " BODY SIZE IS SMALL : " + dataPosition + " (" + bodySize + ") [" + receivedRemainBytes + "] " + rx_body.size + " ")
155+ //int startpos = (data_position > 48) ? (data_position - 48) : 0;
156+ //SimpleLogDumper.dump_bytes("[xxx]", Arrays.copyOfRange(rx_body, startpos, (data_position + 48)));
157+ break
158+ }
159+
160+ // Log.v(TAG, " RX DATA : " + data_position + " (" + body_size + ") [" + received_remain_bytes + "] (" + received_total_bytes + ")");
161+ //SimpleLogDumper.dump_bytes("[yyy] " + data_position + ": ", Arrays.copyOfRange(rx_body, data_position, (data_position + 64)));
162+ if (dataPosition + bodySize > length)
163+ {
164+ // データがすべてバッファ内になかったときは、バッファすべてコピーして残ったサイズを記憶しておく。
165+ val copysize = length - (dataPosition + 12)
166+ byteStream.write(rx_body, dataPosition + 12, copysize)
167+ receivedRemainBytes = bodySize - copysize - 12 // マイナス12は、ヘッダ分
168+ receivedTotalBytes = receivedTotalBytes + copysize
169+ // Log.v(TAG, " --- copy : " + (data_position + 12) + " " + copysize + " remain : " + received_remain_bytes + " body size : " + body_size);
170+ break
171+ }
172+ try
173+ {
174+ byteStream.write(rx_body, dataPosition + 12, bodySize - 12)
175+ dataPosition = dataPosition + bodySize
176+ receivedTotalBytes = receivedTotalBytes + 12
177+ //Log.v(TAG, " --- COPY : " + (data_position + 12) + " " + (body_size - 12) + " remain : " + received_remain_bytes);
178+ }
179+ catch (e: Exception)
180+ {
181+ Log.v(TAG, " pos : $dataPosition size : $bodySize length : $length")
182+ e.printStackTrace()
183+ }
184+ }
185+ return byteStream.toByteArray()
186+ }
187+
188+ override fun isReceiveMulti(): Boolean
189+ {
190+ return (isReceiveMulti)
191+ }
192+
193+ private fun checkReplyInnerDevelopStart(rx_body: ByteArray?)
194+ {
195+ Log.v(TAG, " getRequestStatusEvent : $objectId (" + (rx_body?.size ?: 0) + ") ")
196+ publisher.enqueueCommand(PtpIpCommandGeneric(mine, objectId + 5, isDumpLog, objectId, 0x9116)) // Event Receive
197+ }
198+
199+ private fun requestGetPartialObject(rx_body: ByteArray?) {
200+ Log.v(TAG, " requestGetPartialObject() : $objectId")
201+ if (rx_body != null)
202+ {
203+ SimpleLogDumper.dump_bytes(" requestGetPartialObject ", Arrays.copyOfRange(rx_body, 0, 64))
204+ }
205+ isReceiveMulti = true
206+ receivedFirstData = false
207+
208+ // 0x9107 : GetPartialObject (元は 0x00020000)
209+ var pictureLength: Int
210+ if (rx_body != null && rx_body.size > 52)
211+ {
212+ val dataIndex = 48
213+ pictureLength = (rx_body[dataIndex].toUByte().toInt() and 0xff) + (rx_body[dataIndex + 1].toUByte().toInt() and 0xff shl 8) + (rx_body[dataIndex + 2].toUByte().toInt() and 0xff shl 16) + (rx_body[dataIndex + 3].toUByte().toInt() and 0xff shl 24)
214+ }
215+ else
216+ {
217+ pictureLength = 0x020000
218+ }
219+ if ((pictureLength <= 0)&&(pictureLength > 0x020000))
220+ {
221+ pictureLength = 0x020000
222+ }
223+ Log.v(TAG, " requestGetPartialObject() size : $pictureLength ")
224+ publisher.enqueueCommand(PtpIpCommandCanonGetPartialObject(this, objectId + 1, isDumpLog, objectId, 0x01, 0x00, pictureLength, pictureLength))
225+ }
226+
227+ private fun sendTransferComplete(rx_body: ByteArray?)
228+ {
229+ Log.v(TAG, " sendTransferComplete(), id : $objectId size: " + (rx_body?.size ?: 0))
230+ publisher.enqueueCommand(PtpIpCommandGeneric(this, objectId + 2, isDumpLog, objectId, 0x9117, 4, 0x01)) // 0x9117 : TransferComplete
231+ isReceiveMulti = false
232+ }
233+
234+ companion object
235+ {
236+ private val TAG = CanonSmallImageReceiver::class.java.simpleName
237+ }
238+}
--- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonSmallImageReceiver.java
+++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonSmallImageReceiverPrev.java
@@ -18,7 +18,7 @@ import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.sp
1818 import java.io.ByteArrayOutputStream;
1919
2020
21-public class CanonSmallImageReceiver implements IPtpIpCommandCallback, ICanonSmallImageReceiver
21+public class CanonSmallImageReceiverPrev implements IPtpIpCommandCallback, ICanonSmallImageReceiver
2222 {
2323 private static final String TAG = CanonSmallImageReceiver.class.getSimpleName();
2424
@@ -33,7 +33,7 @@ public class CanonSmallImageReceiver implements IPtpIpCommandCallback, ICanonSma
3333 private int received_total_bytes = 0;
3434 private int received_remain_bytes = 0;
3535
36- public CanonSmallImageReceiver(@NonNull Activity activity, @NonNull IPtpIpCommandPublisher publisher)
36+ public CanonSmallImageReceiverPrev(@NonNull Activity activity, @NonNull IPtpIpCommandPublisher publisher)
3737 {
3838 this.activity = activity;
3939 this.publisher = publisher;
@@ -66,7 +66,7 @@ public class CanonSmallImageReceiver implements IPtpIpCommandCallback, ICanonSma
6666 public boolean isReceiveMulti() {
6767 return (false);
6868 }
69- }, objectId, false, objectId, objectId)); // 0x9141 : RequestInnerDevelopStart
69+ }, objectId, false, objectId, objectId, 0x0f, 0x02)); // 0x9141 : RequestInnerDevelopStart
7070 }
7171
7272 @Override
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -119,11 +119,13 @@
119119 <string-array name="canon_small_picture_type">
120120 <item>TYPE0</item>
121121 <item>TYPE1</item>
122+ <item>TYPE2</item>
122123 </string-array>
123124
124125 <string-array name="canon_small_picture_type_value">
125126 <item>0</item>
126127 <item>1</item>
128+ <item>2</item>
127129 </string-array>
128130
129131 </resources>
Afficher sur ancien navigateur de dépôt.