uml-robotics / ros_tango_native_stream

Streaming depth and odometry to ROS from the Google Tango C API
8 stars 2 forks source link

Runtime error failed to initialize VideoOverlay #3

Closed MallikarjunTirlapur closed 10 years ago

MallikarjunTirlapur commented 10 years ago

Please let me have solution if you already have fixed it.

nuclearmistake commented 10 years ago

On which branch?

We're still looking into streaming video with libtango.so

MallikarjunTirlapur commented 10 years ago

In the file tango_api_jni.cpp

JNIEXPORT jboolean JNICALL Java_edu_uml_TangoAPI_init(JNIEnv env) { if (application != NULL) return true; LOGW("INITIALIZING!"); const char source = TANGO_DATA_SOURCE; application = ApplicationInitialize(source); if (application != NULL) { if (!CHECK_FAIL(DepthStartBuffering(application))) {

ifdef VIDEOOVERLAY_WORKS

        // THIS FAILS RELIABLY... WHY?!
        CAPIErrorCodes err = VideoOverlayInitialize(overlay);
        LOGI("Video overlay err status = %d",err);
        if (!CHECK_FAIL(err))
        {

endif

            if (!CHECK_FAIL(VIOInitialize(application, true, NULL)))
            {
                LOGI("INITIALIZED");
                return (jboolean)true;
            }
            else
            {
                LOGE("Failed to initialize VIO");
                return false;
            }

ifdef VIDEOOVERLAY_WORKS

        }
        else
            LOGE("Failed to initialize VideoOverlay");

endif

    }
    else
    {
        LOGE("Failed to start buffering");
        return false;
    }
}
else
    LOGE("Failed to initialize application");
return (jboolean)false;

}

nuclearmistake commented 10 years ago

Correct. Is that preprocessor defined?

MallikarjunTirlapur commented 10 years ago

yes I defined it in the same file. an argument to the VideoOverlayInitialize function is not overlay, it is application according to the declaration of VideoOverlayInitialize function in videooverlay.h file. I am also able to build the code..

nuclearmistake commented 10 years ago

There is a "next" branch with ingoing work towards video streaming that will get past the error you're seeing. There are other issues with that branch related to video streaming, so master's capabilities don't include video.