当前位置: 首页>>代码示例>>Java>>正文


Java ARNativeData类代码示例

本文整理汇总了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());
    }
}
 
开发者ID:xiuxiu,项目名称:parrot_with_tango,代码行数:8,代码来源:AudioPlayer.java

示例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;
}
 
开发者ID:sonyxperiadev,项目名称:DroneControl,代码行数:12,代码来源:BebopDeviceController.java

示例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;
}
 
开发者ID:sonyxperiadev,项目名称:DroneControl,代码行数:11,代码来源:RollingSpiderDeviceController.java

示例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);
    }
}
 
开发者ID:Palo-IT,项目名称:voice-IT,代码行数:7,代码来源:JSDrone.java

示例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);
    }
}
 
开发者ID:xiuxiu,项目名称:parrot_with_tango,代码行数:6,代码来源:JSDrone.java

示例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);
}
 
开发者ID:sonyxperiadev,项目名称:DroneControl,代码行数:69,代码来源:BebopDeviceController.java

示例7: sendFrame

import com.parrot.arsdk.arsal.ARNativeData; //导入依赖的package包/类
public void sendFrame(ARNativeData data); 
开发者ID:xiuxiu,项目名称:parrot_with_tango,代码行数:2,代码来源:AudioRecorder.java


注:本文中的com.parrot.arsdk.arsal.ARNativeData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。