Log in or register to post comments

VideoPlayBack with NDK creatinig "Description Resource Path Location Type make: *** No rule to make target `clean'. Stop."

March 18, 2013 - 2:11am #1

Can anyone please help me how do i get rid of this error ? 

I have been finding misguiding stuffs on net from past one week .

i am able to generate Videoplayback.so file and when i did add "cd:/cygdrive/c/bin" i got "make: *** No rule to make target `clean'.  

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 21, 2013 - 3:56am #14

Why is it called getVideoID and not getVideoTextureID ?

in Java it is called getVideoTextureID; so either you change the name is Java or in C++, but the names must be the same.

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 21, 2013 - 3:56am #13

ok i changed the name to that . 

but now the texture images are at the right place on detectiing the targets .

but play button is not able to play the video now ..

is it because i am keeping the following things unchanged in the .CPP file ?--

---

 

 config.mPosition.data[0] = 0.0f;
    config.mPosition.data[1] = 0.0f;
//config.mPosition.data[2] = 0.0f;  //added
 
if (isActivityInPortraitMode)
    {
        //LOG("configureVideoBackground PORTRAIT");
        config.mSize.data[0] = videoMode.mHeight
                                * (screenHeight / (float)videoMode.mWidth);
        config.mSize.data[1] = screenHeight;
 
        if(config.mSize.data[0] < screenWidth)
        {
            LOG("Correcting rendering background size to handle missmatch between screen and video aspect ratios.");
            config.mSize.data[0] = screenWidth;
            config.mSize.data[1] = screenWidth *
                              (videoMode.mWidth / (float)videoMode.mHeight);
        }
    }
    else
    {
        //LOG("configureVideoBackground LANDSCAPE");
        config.mSize.data[0] = screenWidth;
        config.mSize.data[1] = videoMode.mHeight
                            * (screenWidth / (float)videoMode.mWidth);
 
        if(config.mSize.data[1] < screenHeight)
        {
            LOG("Correcting rendering background size to handle missmatch between screen and video aspect ratios.");
            config.mSize.data[0] = screenHeight
                                * (videoMode.mWidth / (float)videoMode.mHeight);
            config.mSize.data[1] = screenHeight;
        }
    }

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 21, 2013 - 3:39am #12

the function like this is already there :

 

JNIEXPORT jint JNICALL
Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlaybackRenderer_getVideoID(JNIEnv* env, jobject obj, jint target )
{
    // Return the texture for the video playback created in native
    return videoPlaybackTextureID[target];
}

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 21, 2013 - 3:38am #11

putting the whole new function u mean  ??

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 21, 2013 - 3:15am #10

You should have this function in your VideoPlayback.cpp:

 

JNIEXPORT jint JNICALL
Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlaybackRenderer_getVideoTextureID(JNIEnv* env, jobject obj, jint target )
{
    // Return the texture for the video playback created in native
    return videoPlaybackTextureID[target];
}
 
Can you check ?

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 21, 2013 - 2:14am #9

hi alessandro ,

I followed all the steps carefully .

the erros as u said is in OpenGL view.

my log says -

 

 

03-21 14:38:29.123: E/AndroidRuntime(27942): java.lang.UnsatisfiedLinkError: getVideoTextureID
03-21 14:38:29.123: E/AndroidRuntime(27942): at com.qualcomm.QCARSamples.VideoPlayback.VideoPlaybackRenderer.getVideoTextureID(Native Method)
03-21 14:38:29.123: E/AndroidRuntime(27942): at com.qualcomm.QCARSamples.VideoPlayback.VideoPlaybackRenderer.onSurfaceCreated(VideoPlaybackRenderer.java:134)
03-21 14:38:29.123: E/AndroidRuntime(27942): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1454)
03-21 14:38:29.123: E/AndroidRuntime(27942): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1224)
 
i did not miss a single step u showed in .java and .cpp file.
 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 20, 2013 - 12:27pm #8

Hi,

from your code I see you are quite on the right track (almost there !);

I think you miss just a few more things on the OpenGL side;

please read this Thread, where I already posted the full set of steps that you need to take to add a third video:

https://developer.vuforia.com/forum/android/how-add-new-imagetarget-videoplayback-sample

Happy reading!

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 20, 2013 - 11:50am #7

thanks mate

i successfully generated the .xml and .dat using targetmanager .

i just tried to add one more image naming it "Symb" in the .java file as a third constant value. that is "2"

and increased the number to 3 from 2 .

i have following questions

1) does adding a .mp4 video in asset and assigning it in .java file create problem ?

 

 mMovieName[STONES] = "VuforiaSizzleReel_1.m4v";
        mMovieName[CHIPS] = "VuforiaSizzleReel_2.m4v";
        mMovieName[SYMB] = "movie.mp4";
 
.....
i dont think there is any modifications needed in the videorenderer and videoplaybackhelper java classes ... ?
 
2) following are the changes at Videoplayback.cpp file.
 
 
static const int NUM_TARGETS = 3;
static const int STONES = 0;
static const int CHIPS = 1;
static const int SYMB = 2;
 
 
added a variable -
GLfloat videoQuadTextureCoordsTransformedSymb[] = {
    0.0f, 0.0f,
    1.0f, 0.0f,
    1.0f, 1.0f,
    0.0f, 1.0f,
};

 

  for (int i=0; i<NUM_TARGETS; i++)
    {
        targetPositiveDimensions[i].data[0] = 0.0;
        targetPositiveDimensions[i].data[1] = 0.0;
        targetPositiveDimensions[i].data[2] = 0.0;
 
        videoPlaybackTextureID[i] = -1;
    }

QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 3);

 

 

 if ( (intersection.data[0] >= -(targetPositiveDimensions[target].data[0])) && (intersection.data[0] <= (targetPositiveDimensions[target].data[0])) &&
         (intersection.data[1] >= -(targetPositiveDimensions[target].data[1])) && (intersection.data[1] <= (targetPositiveDimensions[target].data[1])))
" adding an element here too ??"
 
---->
......
else if(target == SYMB)
{
uvMultMat4f(videoQuadTextureCoordsTransformedSymb[0], videoQuadTextureCoordsTransformedSymb[1], videoQuadTextureCoords[0], videoQuadTextureCoords[1], mtx);
        uvMultMat4f(videoQuadTextureCoordsTransformedSymb[2], videoQuadTextureCoordsTransformedSymb[3], videoQuadTextureCoords[2], videoQuadTextureCoords[3], mtx);
        uvMultMat4f(videoQuadTextureCoordsTransformedSymb[4], videoQuadTextureCoordsTransformedSymb[5], videoQuadTextureCoords[4], videoQuadTextureCoords[5], mtx);
        uvMultMat4f(videoQuadTextureCoordsTransformedSymb[6], videoQuadTextureCoordsTransformedSymb[7], videoQuadTextureCoords[6], videoQuadTextureCoords[7], mtx);
 
 
}

------->

 

else if(strcmp(imageTarget.getName(), "symb") == 0)
currentTarget=SYMB;
 
 

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 20, 2013 - 3:09am #6

You need to geenrate the XML and DAT files using the Target Manager (online) and uploading your images to your Database (then download the database from the Target Manager).

See here:

https://developer.vuforia.com/resources/dev-guide/managing-targets-device-database-using-target-manager

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 19, 2013 - 4:31am #5

 

<?xml version="1.0"?>
<QCARConfig xsi:noNamespaceSchemaLocation="qcar_config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Tracking>
        <ImageTarget name="stones" size="247 173"/>
        <ImageTarget name="chips" size="247 173"/>
        <ImageTarget name="chips1" size="247 173"/> 
    </Tracking>
</QCARConfig>
 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 19, 2013 - 4:29am #4

hi

I did solve it now.

i ran the Videoplay application .

now i added third image - stone1.jpg

and did the necessary changes also.

i am now stuck with the error "Failed to load dataset: stonesandchips.xml" 

i edited that .xml file and added stone1 like the 2 other images there.

i have no idea how to convert that to .dat file .

i ran ndk-build and the modified project is in my workspace

thanks

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 18, 2013 - 3:07am #3

Hi, not sure to follow here; can't you just run ndk-build from within the sample project directory ?

 

VideoPlayBack with NDK creatinig "Description Resource Path Loca

March 18, 2013 - 2:31am #2

 

$ /cygdrive/c/Development/Android/android-ndk-r8d/ndk-build                                                                                                                                     Prebuilt       : libQCAR.so <= jni/../../../build/lib/armeabi/
Install        : libQCAR.so => libs/armeabi/libQCAR.so
Cygwin         : Generating dependency file converter script
Compile++ arm    : VideoPlayback <= VideoPlayback.cpp
Compile++ arm    : VideoPlayback <= SampleUtils.cpp
Compile++ arm    : VideoPlayback <= Texture.cpp
Compile++ arm    : VideoPlayback <= SampleMath.cpp
StaticLibrary  : libstdc++.a
SharedLibrary  : libVideoPlayback.so
Install        : libVideoPlayback.so => libs/armeabi/libVideoPlayback.so
Prebuilt       : libQCAR.so <= jni/../../../build/lib/armeabi-v7a/
Install        : libQCAR.so => libs/armeabi-v7a/libQCAR.so
Compile++ arm    : VideoPlayback <= VideoPlayback.cpp
Compile++ arm    : VideoPlayback <= SampleUtils.cpp
Compile++ arm    : VideoPlayback <= Texture.cpp
Compile++ arm    : VideoPlayback <= SampleMath.cpp
StaticLibrary  : libstdc++.a
SharedLibrary  : libVideoPlayback.so
Install        : libVideoPlayback.so => libs/armeabi-v7a/libVideoPlayback.so
 
 
the created .so file .
 
Log in or register to post comments