Kalay1.0标准-升级版PSC

Kalay1.0 升级版PSC


Upgrade Android Old API to New API

<p>[TOC]</p> <h1>1. The old API is deleted, please replace it with the new API.</h1> <table> <thead> <tr> <th style="text-align: left;">Old API</th> <th style="text-align: left;">New API</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">Camera.registerIOTCListener</td> <td style="text-align: left;">Camera.TK_registerIOTCListener</td> </tr> <tr> <td style="text-align: left;">Camera.getIOTCamerVersion</td> <td style="text-align: left;">Camera.TK_getIOTCameraVersion</td> </tr> <tr> <td style="text-align: left;">Camera.SearchLAN</td> <td style="text-align: left;">Camera.TK_LanSearch</td> </tr> <tr> <td style="text-align: left;">Camera.connect</td> <td style="text-align: left;">Camera.TK_connect</td> </tr> <tr> <td style="text-align: left;">Camera.start</td> <td style="text-align: left;">Camera.TK_start</td> </tr> <tr> <td style="text-align: left;">Camera.disconnect</td> <td style="text-align: left;">Camera.TK_disconnect</td> </tr> <tr> <td style="text-align: left;">Camera.stop</td> <td style="text-align: left;">Camera.TK_stop</td> </tr> <tr> <td style="text-align: left;">Camera.isSessionConnected</td> <td style="text-align: left;">Camera.TK_isSessionConnected</td> </tr> <tr> <td style="text-align: left;">Camera.isChannelConnected</td> <td style="text-align: left;">Camera.TK_isChannelConnected</td> </tr> <tr> <td style="text-align: left;">Camera.startShow</td> <td style="text-align: left;">Camera.TK_startShow</td> </tr> <tr> <td style="text-align: left;">Camera.startShowWithYUV</td> <td style="text-align: left;">Camera.TK_startShow</td> </tr> <tr> <td style="text-align: left;">Camera.startShowWithRGB</td> <td style="text-align: left;">Camera.TK_startShow</td> </tr> <tr> <td style="text-align: left;">Camera.stopShow</td> <td style="text-align: left;">Camera.TK_stopShow</td> </tr> <tr> <td style="text-align: left;">Camera.getVideoCodecId</td> <td style="text-align: left;">Camera.TK_getVideoCodecId</td> </tr> <tr> <td style="text-align: left;">Camera.startSpeaking</td> <td style="text-align: left;">Camera.TK_startSoundToDevice</td> </tr> <tr> <td style="text-align: left;">Camera.stopSpeaking</td> <td style="text-align: left;">Camera.TK_stopSoundToDevice</td> </tr> <tr> <td style="text-align: left;">Camera.startListening</td> <td style="text-align: left;">Camera.TK_startSoundToPhone</td> </tr> <tr> <td style="text-align: left;">Camera.stopListening</td> <td style="text-align: left;">Camera.TK_stopSoundToPhone</td> </tr> <tr> <td style="text-align: left;">Camera.startAcousticEchoCanceler</td> <td style="text-align: left;">Automatically turn on</td> </tr> <tr> <td style="text-align: left;">Camera.stopAcousticEchoCanceler</td> <td style="text-align: left;">Automatically turn off</td> </tr> <tr> <td style="text-align: left;">Camera.setAudioInputCodecId</td> <td style="text-align: left;">Camera.TK_setSoundToDeviceFormats</td> </tr> <tr> <td style="text-align: left;">Camera.getAudioInputCodecId</td> <td style="text-align: left;">Camera.TK_getSoundToDeviceCodecId</td> </tr> <tr> <td style="text-align: left;">Camera.getAudioOutputCodecId</td> <td style="text-align: left;">Camera.TK_getSoundToPhoneCodecId</td> </tr> <tr> <td style="text-align: left;">Camera.startRecording</td> <td style="text-align: left;">Camera.TK_startRecording</td> </tr> <tr> <td style="text-align: left;">Camera.startRecordingWithoutAudio</td> <td style="text-align: left;">Camera.TK_startRecording</td> </tr> <tr> <td style="text-align: left;">Camera.stopRecording</td> <td style="text-align: left;">Camera.TK_stopRecording</td> </tr> <tr> <td style="text-align: left;">Camera.sendIOCtrl</td> <td style="text-align: left;">Camera.TK_sendIOCtrlToChannel</td> </tr> <tr> <td style="text-align: left;">Camera.removeAllCmd</td> <td style="text-align: left;">Camera.TK_removeAllCmd</td> </tr> <tr> <td style="text-align: left;">Camera.getAVChannelCount</td> <td style="text-align: left;">Camera.TK_getAVChannelCount</td> </tr> <tr> <td style="text-align: left;">Camera.getChannelServiceType</td> <td style="text-align: left;">Camera.TK_getServiceTypeOfChannel</td> </tr> <tr> <td style="text-align: left;">Camera.getMSID</td> <td style="text-align: left;">Camera.getSID</td> </tr> <tr> <td style="text-align: left;">Camera.TK_playAecAudio</td> <td style="text-align: left;">Camera.TK_playAudio</td> </tr> <tr> <td style="text-align: left;">Camera.TK_sendAecAudio</td> <td style="text-align: left;">Camera.TK_sendAudio</td> </tr> <tr> <td style="text-align: left;">Camera.TK_isAudioOutput</td> <td style="text-align: left;">Camera.TK_setAudioCustom</td> </tr> </tbody> </table> <h1>2. Initialization (uninitialization) API Modification</h1> <p>Please use TK_initIOTC(Context context, String privateKey, String sdkLicenseKey, TK_Listener listener) to initialize the sdk. Please use TK_unInitIOTC() to de-initialize the sdk. Other initialization APIs have been deleted and the specific modifications are as follows:</p> <ol> <li>Delete init(Context context)</li> <li>Delete init(Context context, String company)</li> <li>Delete TK_initIOTC()</li> <li>Delete TK_initIOTC(String company)</li> <li>Delete TK_initIOTC(Context context, String privateKey, TK_Listener listener)</li> <li>Delete TK_initIOTCWithLicenseKey(Context context, String privateKey, String sdkLicensekey, TK_Listener listener)</li> <li>Delete TK_initIOTC(String company)</li> <li>Delete uninit()</li> </ol> <h1>3. Connection API Modification</h1> <p>Please use Camera.TK_connect to connect the device and Camera.TK_start to connect the AV channel. Compared with the old API, the new API modifies parameters, requires only UID for independent connection, and password for channel opening. The specific modifications are as follows:</p> <ol> <li>Change parameters,Camera.TK_connect(String uid, String viewAccount, String viewPasswd) ====&gt; Camera.TK_connect(String uid) or Camera.TK_connect(String uid, String authKey)</li> <li>Change parameters,Camera.TK_start(int avChannel) ====&gt; Camera.TK_start(int avChannel, String password)</li> <li>Change parameters,Camera.TK_start(int avChannel, int authType) ====&gt; Camera.TK_start(int avChannel, String password, String account, Camera.AuthType type, Camera.SecurityMode mode)</li> <li>Delete Camera.TK_setDtls. If you want to use DTLS to connect, please use Camera.TK_start(int avChannel, String password, String account, Camera.AuthType type, Camera.SecurityMode mode)</li> </ol> <h1>4. Video Streaming API Modifications</h1> <p>Please use TK_startShow(int avChannel) to start the video stream. If you want to get video data, use Camera.TK_registerMediaDataListener. The specific modifications are as follows:</p> <ol> <li>Delete Camera.TK_startShowWithYUV, if you want to get the decoded yuv data, please use TK_startShow(int avChannel, boolean runSoftwareDecode, boolean isDropFrame, boolean isRender, Camera.RenderType type)</li> <li>Delete Camera.TK_startShowWithRGB, if you want to get the decoded rgb data, please use TK_startShow(int avChannel, boolean runSoftwareDecode, boolean isDropFrame, boolean isRender, Camera.RenderType type)</li> <li>Delete Camera.TK_startRecvFrame/Camera.TK_stopRecvFrame,if you want to only obtain the device video stream without decoding and rendering, please use TK_startShow(int avChannel, boolean runSoftwareDecode, boolean isDropFrame, boolean isRender, Camera.RenderType type)</li> </ol> <h1>5. Audio Streaming API Modifications</h1> <p>Please use TK_startSoundToPhone(int avChannel) to start the audio stream. Compared with the old API, the new API changes the isListener parameter to isDecodeAndPlay. If you want to get audio data, use Camera.TK_registerMediaDataListener. The specific modifications are as follows:</p> <ol> <li>Change parameters,Camera.startSoundToPhone(int avChannel, boolean isListener) ====&gt; Camera.startSoundToPhone(int avChannel, boolean isDecodeAndPlay),the framework automatically determines whether the audio needs to be played. The isListener parameter is changed to isDecodeAndPlay, indicating whether it needs to be decoded and played.</li> <li>Delete Camera.TK_startRecvAudio/Camera.TK_stopRecvAudio.If you want to only get the audio from the device without decoding and playing it, please use Camera.startSoundToPhone(int avChannel, boolean isDecodeAndPlay)</li> <li>Delete TK_startAcousticEchoCanceler/TK_stopAcousticEchoCanceler/TK_setAcousticEchoCancelerDelaySize. Currently, the framework adopts the system echo cancellation method, and there is no need to call such API for settings.</li> <li>Delete TK_setAudioPlayTheWay. To set the audio playback mode, please use TK_setSoundToPhonePlaySource instead.</li> <li>Change API name:TK_setAudioCustom(Original API:TK_setAudioOutput)。</li> <li>Change API name:TK_getSoundToDeviceCodeId(Original API:TK_getAudioInputCodecId)。</li> <li>Added API:TK_setSoundToDeviceCaptureSource,used to set the collection source and collection audio gain of audio intercom, and can be used to adapt the headset function.</li> <li>Added API:TK_setSoundToPhonePlaySource,used to set the playback source for audio monitoring, which can be used to adapt the headphone function.</li> </ol> <h1>6. Screenshot API Modification</h1> <p>Please use Camera.TK_snapshot(int channel, String filePath, long bitmapPixels) to take a screenshot. The specific modifications are as follows:</p> <ol> <li>Delete Camera.setSnapshot/Camera.SetCameraListener</li> <li>Delete Camera.TK_setSnapshot/Camera.TK_setCameraListener</li> <li>Delete Camera.TK_snapshotByCurrentBitmap</li> </ol> <h1>7. Video Recording API Modification</h1> <p>Please use Camera.TK_startRecording(int channel, String path) to record. The framework no longer limits the recording time and automatically determines whether audio needs to be recorded. The specific modifications are as follows:</p> <ol> <li>Delete Camera.TK_startRecordingForChannel</li> <li>Delete Camera.TK_startRecordingWithoutAudio</li> </ol> <h1>8. Player Modification</h1> <p>Please use soft/hard decoding and use com.tutk.IOTC.VideoMonitor uniformly. The old player will be deleted. Use TK_setMonitorListener to get the player's event callback. The specific modifications are as follows:</p> <ol> <li>Delete com.tutk.IOTC.Monitor</li> <li>Delete com.tutk.IOTC.MediaCodecMonitor</li> <li>Delete com.tutk.IOTC.MediaCodecMonitor_MPEG4</li> <li>Delete com.tutk.IOTC.NewMediaCodecMonitor</li> </ol> <h1>9. Audio and Video Data API Modification</h1> <p>Added Camera.TK_registerMediaDataListener/Camera.TK_unregisterMediaDataListener to obtain audio and video data, and deleted other APIs for obtaining audio and video data. The deletion API is as follows:</p> <ol> <li> <p>Get video reception raw data callback Camera.TK_registerVideoDataListeners/Camera.TK_unregisterVideoDataListeners</p> </li> <li> <p>Get video reception raw data callback Camera.registerVideoDataListeners/Camera.unregisterVideoDataListeners</p> </li> <li> <p>Get audio reception raw data callback Camera.TK_registerAudioListener/Camera.TK_unregisterAudioListener</p> </li> <li> <p>Get audio reception raw data callback Camera.registerAudioListener/Camera.unregisterAudioListener</p> </li> <li> <p>Hard decoded video receiving raw data callback Camera.TK_registerFrameInfoListener/Camera.TK_unRegisterFrameInfoListener Camera.registerFrameInfoListener/Camera.unRegisterFrameInfoListener</p> </li> <li> <p>Video decoding information callback Camera.setOnDecodeListener Camera.TK_setOnDecodeListener</p> </li> <li> <p>YUV data acquisition Camera.TK_registerYuvListener/Camera.TK_unRegisterYuvListener</p> </li> <li> <p>RGB data acquisition Camera.TK_registerRgbListener/Camera.TK_unRegisterRgbListener</p> </li> <li> <p>Soft/hard decoded data callback InterfaceCtrl.IRegisterIOTCListener.receiveFrameData InterfaceCtrl.IRegisterIOTCListener.receiveFrameDataForMediaCodec InterfaceCtrl.IOTCListener.receiveFrameData InterfaceCtrl.IOTCListener.receiveFrameDataForMediaCodec</p> </li> <li>Video frame rate (fps), bit rate (bps) and other debugging information callbacks InterfaceCtrl.IRegisterIOTCListener.receiveFrameInfo InterfaceCtrl.IOTCListener.receiveFrameInfo</li> </ol> <h1>10. IOTC callback interface modification</h1> <p>&gt; Original IRegisterIOTCListener, now IOTCListener</p> <p>Modify the interface name, modify the parameters in the interface, and delete the debug callback. The specific modifications are as follows:</p> <ol> <li>Modify name,IRegisterIOTCListener ====&gt; IOTCListener</li> <li>Modify name,SimpleIRegisterIOTCListener ====&gt; SimpleIOTCListener</li> <li>Modify callback parameters,receiveSessionInfo(Camera camera, int resultCode) ====&gt; receiveSessionInfo(Camera camera, int resultCode, int p2pCode)</li> <li>Modify callback parameters,receiveChannelInfo(Camera camera, int avChannel, int resultCode) ====&gt; receiveChannelInfo(Camera camera, int avChannel, int resultCode, int p2pCode)</li> <li>Delete debugSessionInfo,please use receiveSessionInfo</li> <li>Delete debugChannelInfo,please use receiveChannelInfo</li> <li>Modify callback name, receiveIOCtrlData ====&gt; sendIOCtrlData, more in line with the meaning of API.</li> <li>Modify callback name, receiveJsonIOCtrlData ====&gt; sendJsonIOCtrlData, more in line with the meaning of API.</li> <li>Modify callback name, retStartListen ====&gt; receiveSoundToPhone, more in line with the meaning of API.</li> <li>Modify callback name, retStartChannel ====&gt; receiveSoundToDevice, more in line with the meaning of API.</li> </ol>

页面列表

ITEM_HTML