本文整理汇总了Java中com.parrot.arsdk.arsal.ARNativeData类的典型用法代码示例。如果您正苦于以下问题:Java ARNativeData类的具体用法?Java ARNativeData怎么用?Java ARNativeData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ARNativeData类属于com.parrot.arsdk.arsal包,在下文中一共展示了ARNativeData类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDataReceived
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
public void onDataReceived(ARNativeData currentFrame)
{
if (mPlaying && mAudioTrack != null)
{
mAudioTrack.write(currentFrame.getByteData(), 0, currentFrame.getDataSize());
}
}
示例2: onCallback
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
@Override
public ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM onCallback(int ioBufferId, ARNativeData data, ARNETWORK_MANAGER_CALLBACK_STATUS_ENUM status,
Object customData) {
ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM retVal = ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM.ARNETWORK_MANAGER_CALLBACK_RETURN_DEFAULT;
if (status == ARNETWORK_MANAGER_CALLBACK_STATUS_ENUM.ARNETWORK_MANAGER_CALLBACK_STATUS_TIMEOUT) {
retVal = ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM.ARNETWORK_MANAGER_CALLBACK_RETURN_DATA_POP;
}
return retVal;
}
示例3: onCallback
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
@Override
public ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM onCallback(int ioBufferId, ARNativeData data, ARNETWORK_MANAGER_CALLBACK_STATUS_ENUM status,
Object customData) {
ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM retVal = ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM.ARNETWORK_MANAGER_CALLBACK_RETURN_DEFAULT;
if (status == ARNETWORK_MANAGER_CALLBACK_STATUS_ENUM.ARNETWORK_MANAGER_CALLBACK_STATUS_TIMEOUT) {
retVal = ARNETWORK_MANAGER_CALLBACK_RETURN_ENUM.ARNETWORK_MANAGER_CALLBACK_RETURN_DATA_POP;
}
return retVal;
}
示例4: sendStreamingFrame
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
public void sendStreamingFrame(ARNativeData data) {
if ((mDeviceController != null) &&
(mState.equals(ARCONTROLLER_DEVICE_STATE_ENUM.ARCONTROLLER_DEVICE_STATE_RUNNING))) {
mDeviceController.sendStreamingFrame(data);
}
}
示例5: sendStreamingFrame
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
public void sendStreamingFrame(ARNativeData data) {
if ((mDeviceController != null) && (mState.equals(ARCONTROLLER_DEVICE_STATE_ENUM.ARCONTROLLER_DEVICE_STATE_RUNNING))) {
mDeviceController.sendStreamingFrame(data);
}
}
示例6: start
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
private boolean start() {
Logger.d(TAG, "start ...");
boolean failed = false;
registerARCommandsListener();
failed = startNetwork();
if (!failed) {
startReadThreads();
startLooperThread();
}
nativeData = new ARNativeData();
streamReaderListener = new ARStreamReaderListener() {
private int lastValidBufferCapacity = 0;
@Override
public ARNativeData didUpdateFrameStatus(ARSTREAM_READER_CAUSE_ENUM cause, final ARNativeData currentFrame, final boolean isFlushFrame,
int nbSkippedFrames, int newBufferCapacity) {
if (cause == ARSTREAM_READER_CAUSE_ENUM.ARSTREAM_READER_CAUSE_FRAME_COMPLETE) {
if (mControllerListener != null) {
mControllerListener.onNewVideoFrame(currentFrame.getByteData(), currentFrame.getDataSize(), isFlushFrame);
}
currentFrame.dispose();
return new ARNativeData(lastValidBufferCapacity);
} else if (cause == ARSTREAM_READER_CAUSE_ENUM.ARSTREAM_READER_CAUSE_FRAME_TOO_SMALL) {
lastValidBufferCapacity = newBufferCapacity;
return new ARNativeData(lastValidBufferCapacity);
} else if (cause == ARSTREAM_READER_CAUSE_ENUM.ARSTREAM_READER_CAUSE_COPY_COMPLETE) {
currentFrame.dispose();
return null;
} else if (cause == ARSTREAM_READER_CAUSE_ENUM.ARSTREAM_READER_CAUSE_CANCEL) {
currentFrame.dispose();
return null;
}
return null;
}
};
if (netManager != null) {
streamReader = new ARStreamReader(netManager, iobufferD2cArstreamData, iobufferC2dArstreamAck, nativeData, streamReaderListener,
DEFAULT_VIDEO_FRAGMENT_SIZE, VIDEO_RECEIVE_TIMEOUT);
mStreamReaderDataThread = new Thread(streamReader.getDataRunnable());
mStreamReaderAckThread = new Thread(streamReader.getAckRunnable());
mStreamReaderDataThread.start();
mStreamReaderAckThread.start();
} else {
Logger.d(TAG, "Could not start video streaming");
}
new Notifier() {
@Override
public void onNotify(DeviceControllerListener listener) {
if (listener != null) {
listener.onDroneDeviceInit(getDeviceInfo());
}
}
};
return (!failed);
}
示例7: sendFrame
import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
public void sendFrame(ARNativeData data);