public void onPreviewFrame(byte[] _data, Camera _camera) {
          if (NgnProxyVideoProducer.super.mValid) {
            mVideoFrame.put(_data);
            mProducer.push(mVideoFrame, mVideoFrame.capacity());
            mVideoFrame.rewind();

            if (NgnProxyVideoProducer.sAddCallbackBufferSupported) {
              NgnCameraProducer.addCallbackBuffer(_camera, _data);
            }
          }
        }
  public NgnProxyVideoProducer(BigInteger id, ProxyVideoProducer producer) {
    super(id, producer);
    mCallback = new MyProxyVideoProducerCallback(this);
    mProducer = producer;
    mProducer.setCallback(mCallback);

    // Initialize video stream parameters with default values
    mWidth = NgnProxyVideoProducer.DEFAULT_VIDEO_WIDTH;
    mHeight = NgnProxyVideoProducer.DEFAULT_VIDEO_HEIGHT;
    mFps = NgnProxyVideoProducer.DEFAULT_VIDEO_FPS;
  }
 public void pushBlankPacket() {
   if (super.mValid && mProducer != null && mVideoFrame != null) {
     final ByteBuffer buffer = ByteBuffer.allocateDirect(mVideoFrame.capacity());
     mProducer.push(buffer, buffer.capacity());
   }
 }
 public void setRotation(int rot) {
   if (mProducer != null && super.mValid) {
     mProducer.setRotation(rot);
   }
 }