给出错误的JavaCV Stream-Test代码

时间:2015-05-26 02:52:42

标签: android ffmpeg javacv

我希望有人可以告诉我这里我做错了什么。我下载了vanevery的GitHub项目“JavaCV-0.5-Stream-Test”,这个项目已有几年了,所以我更新到了最新的JavaCV版本0.11。但是Android Studio正在返回错误......

错误:

  

“FFmpegFrameRecorder中的记录(org.bytedeco.javacpp.Frame)不能   适用于(org.bytedeco.javacpp.opencv_core.lplimage)“for the line   读取record.record(yuvIplimage)的代码   onPreviewFrame。

这是我的代码:

    @Override
    public void onPreviewFrame(byte[] data, Camera camera) {

        if (yuvIplimage != null && recording) {

            videoTimestamp = 1000 * (System.currentTimeMillis() - startTime);

            // Put the camera preview frame right into the yuvIplimage object
            yuvIplimage.getByteBuffer().put(data);

            try {
                // Get the correct time
                recorder.setTimestamp(videoTimestamp);

                // Record the image into FFmpegFrameRecorder
                recorder.record(yuvIplimage);

            } catch (FFmpegFrameRecorder.Exception e) {
                Log.v(LOG_TAG,e.getMessage());
                e.printStackTrace();
            }
        }
    }

0 个答案:

没有答案