Topic locked

The question for sample

April 21, 2012 - 11:21pm #1

Hi. I use the smaples. ex.DrameMarkers . I have a error message. FATAL EXCEPTION: main java.lang.UnsatisfiedLinkError: setActivityPortraitMode 04-22 14:05:03.355: E/AndroidRuntime(12924): at com.qualcomm.QCARSamples.FrameMarkers.FrameMarkers.setActivityPortraitMode(Native Method) 04-22 14:05:03.355: E/AndroidRuntime(12924): at com.qualcomm.QCARSamples.FrameMarkers.FrameMarkers.initApplication(FrameMarkers.java:546) ( setActivityPortraitMode(screenOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); ) I was try to skip . But out of other error. Plz~ give me some advice how to do. By the way ...other sample was same error. I use Ecilpse for Mac . The android sdk is new. The qcar sdk Is new. I checked on the Internet! But I can not find the issues related to.

The question for sample

November 24, 2014 - 1:40am #41

This is an old thread.

With the current version of Vuforia (3.0), the Video Playback sample is written in Java entirely.

So, you need to look at the VideoPlayback.java, VideoPlaybackRenderer.java and VideoPlayerHelper.java files.

Also, if you go to this page:

https://developer.vuforia.com/resources/sample-apps/video-playback-sample-app

and you click on "Sample Specific Notes" to unfold it, you will find a description of the most relevant parts of the sample code.

 

The question for sample

November 23, 2014 - 8:39pm #40

I just downloaded the videoplayback sample. These is no videoplayback.cpp file in the zip folder.

 

Please help. Urgent!

The question for sample

March 25, 2013 - 11:54pm #39

The visualization of the videos in native code (VideoPlayback.cpp) is based on the currentStatus variable (for each video);

the currentStatus is updated via the setStatus function, which is called from Java; most of the logic that controls the video playback is done in Java, while the C++ part if more focused on the rendering aspect.

I cannot guide you through all the code of VideoPlayback sample, as it consists of several thousands lines of code;

however the sample code structure is explained in all its major aspects in this page:

https://developer.vuforia.com/resources/sample-apps/video-playback-sample-app

(open the foldable item titled "Sample Specific Notes" at the bottom of the page and you will see the sample code structure explained)

 

The question for sample

March 25, 2013 - 9:47pm #38

ok thanks, and where is process of playing video after target image detaction.

 

 

Thanks..

 

 

The question for sample

March 19, 2013 - 8:02am #37

Sure, you can look at Videoplayback.cpp, in the renderFrame() function, you will find a line like:

for (int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++) ...

That's where the state is iterated for the currently detected trackables.

The question for sample

March 19, 2013 - 7:00am #36

Hello

may i know where is target image detaction in VideoPlayback sample ?

 

 

Thanks

The question for sample

March 18, 2013 - 3:12am #35

Hi,

you could combine the code in the VideoPlayback sample (which shows how to display a video on a target...),

with the code in CloudReco sample;

note: we don't have a specific tutorial for such use case (so you will need to dig a bit into the sample code and find your way through it);

however, we have prepared a code "walk-through" to make the exploration of the VideoPlayback sample code simpler; you can find it here:

https://developer.vuforia.com/resources/sample-apps/video-playback-sample-app

look at the sub-section with title "Sample Specific Notes" (open it) and you will find the sample code explanation (for Android).

 

The question for sample

March 18, 2013 - 2:37am #34

Hii AlessandroB,

 

in CloudRecognition sample how can we play video instead of display book data in dialog  after metch target image ?

 

Thanks.

 

The question for sample

March 16, 2013 - 7:13am #33

you're welcome

The question for sample

March 16, 2013 - 6:37am #32

Hii AlessandroB,

 

now its working fine..

 

Thanks..

 

 

 

 

The question for sample

March 16, 2013 - 5:36am #31

Hi

as per ur suggestion i have uploaded matadata(sample.txt) which contain 

Hello, I am a metadata

samplebook1.json

 and i am getting 1 star retting then i have replaced the "kAccesskey" and "kSecretKey" in CloudReco.h but i am getting below exception

 

03-16 17:56:45.300: D/QCAR(19283): Couldn't get books. e: java.io.FileNotFoundException: https://ar.qualcomm.at/samples/cloudreco/json/Hello, I am a metadata
03-16 17:56:45.300: D/QCAR(19283): samplebook1.json

The question for sample

March 16, 2013 - 2:21am #30

I guess you are simply not seeing the book cover that  is usually displayed when the target is recognized;

this does not mean that the target is not recognized, it simply means that i cannot display any information (book cover) because your image has no metadata associated with it;

so, first create a metadata file in your PC file syetm (call it for instance my_metadata_file.txt), then open it with a text editor and put this simple line of text inside it:

samplebook1.json

Such string is something that the CloudReco sample can use to find out which book cover needs to display.

So, now you need to add the metadata to your image target; to do that, go to the Target Manager, login, open your Cloud Database, click on the Image Target that you like and then click on the button "Upload Metadata' that you should see on the right.

It will ask you to provide a file; point the file browser to the file you previously create and click OK to upload it.

Then you will need to wait a few minutes in order to get the target completely updated and read-to-use.

Then you can launch the sample again and this time it should work; 

BTW, what is the star rating of your Target ?

 

 

The question for sample

March 16, 2013 - 2:03am #29

yes, it was problem is working in Samasung Galaxy Grand (I9082) no issue for other device, now i have problem is change target image in CloudRecognition sample, i have followed below 

 

  1. Sign-up for the cloud recognition service inside the Target Manager.
  2. Create a cloud database.
  3. Provision a couple of images.
  4. Download the client access/secret keys, and replace the "kAccesskey" and "kSecretKey" default values with your own key values in:
  • (Android) /jni/CloudReco.h

but my new image is not detecting, please help me if i am missing something..

 

Thanks...

The question for sample

March 15, 2013 - 7:38am #28

Hi could you start a new Thread? as we are deviating quite a bit from the original topic.

thanks.

The question for sample

March 15, 2013 - 6:40am #27

ok..

i have follow below steps in CloudRecognition for change target image but  now i am not able to detect my new image. anything missing ?

  1. Sign-up for the cloud recognition service inside the Target Manager.
  2. Create a cloud database.
  3. Provision a couple of images.
  4. Download the client access/secret keys, and replace the "kAccesskey" and "kSecretKey" default values with your own key values in:
  • (Android) /jni/CloudReco.h

 

Thanks

The question for sample

March 15, 2013 - 6:28am #26

Hi,

we are aware of the issue on the I9082, you can follow the thread here:

https://developer.vuforia.com/forum/device-support/samasung-galaxy-grand-i9082-camera-preview-black

 

The question for CloudRecognition sample

March 15, 2013 - 4:08am #25

Hello

when i run CloudRecognition sample that time in Samasung Galaxy Grand (I9082) screen black, i mean not able to detect image.

 

 

Thanks

 

 

The question for sample

March 14, 2013 - 5:46am #24

Yes, you will need to create a DataSet with your desired images, using the online Target Manager:

please read here:

https://developer.vuforia.com/resources/dev-guide/target-manager-user-guide

 

The question for sample

March 14, 2013 - 3:19am #23

Hi AlessandroB,

 

is it possible to change target image in VideoPlayback sample ?

 

The question for sample

March 14, 2013 - 1:05am #22

You're welcome.

The question for sample

March 13, 2013 - 11:44pm #21

its working now thanks :)

The question for sample

March 13, 2013 - 8:28am #20

I think I am not following:

the VideoView is a 2D view in Android, and it is used to display the video in fullscreen (not in 3D on the target itself)

on the other hand, the positiveVideoDimension variable is only used for 3D rendering in OpengGL.

 

 

The question for sample

March 13, 2013 - 8:19am #19

yes i have changed in VideoPlayback.cpp but not change size of video as requirement, can we get target image size in activity ? so we will set size of  VideoView.

 

The question for sample

March 13, 2013 - 5:56am #18

See this line of code in VideoPlayback.cpp:

targetPositiveDimensions[currentTarget] = imageTarget.getSize();

that ensures already that the video fits into the target image, but you can adjust that value to your needs.

 

The question for sample

March 13, 2013 - 5:48am #17

yes targetPositiveDimensions in VideoPlayback.cpp there, what we need to change there ?

 

The question for sample

March 13, 2013 - 5:36am #16

Ok, I see. That's already what the sample does;

if you want to change the size of the video (as diaplayed "on the target" in 3D), you can change the targetPositiveDimensions variable (in VideoPlayback.cpp).

 

The question for sample

March 13, 2013 - 5:23am #15

hi

i have try with custom size, but video display in full screen not in given size, we need Play remote video on target image and in target image size.

 

 

 

The question for sample

March 13, 2013 - 5:01am #14

Not quite sure I understand your last message;

however, in general you can do:

mVideoView.getLayoutParams().width = YOUR CUSTOM VALUE

mVideoView.getLayoutParams().height = YOUR CUSTOM VALUE

 

 

The question for sample

March 13, 2013 - 4:25am #13

yes but requirement is that, need to play video in dynamically size like when i match with small image so video sould be display in that image size.

 

 

Thanks.. 

The question for sample

March 13, 2013 - 12:35am #12

Hi, you can look at the code in FullscreenPlayback:

public void onVideoSizeChanged(MediaPlayer mp, int width, int height)
    {
        mMediaPlayerLock.lock();

            // Get video and screen dimensions:
            int videoWidth = mMediaPlayer.getVideoWidth();
            int videoHeight = mMediaPlayer.getVideoHeight();
            int screenWidth = getWindowManager().getDefaultDisplay().getWidth();
            
            // Apply aspect ratio:
            mVideoView.getLayoutParams().height = (int) (((float) videoHeight /
                                   (float) videoWidth ) * (float) screenWidth );
            mVideoView.getLayoutParams().width = screenWidth;
            
        mMediaPlayerLock.unlock();
    }

you should be able to achieve the resizing by modifying that code to use your custom size.

The question for sample

March 12, 2013 - 11:39pm #11

Hi AlessandroB,

can we modify size of VideoView ? in VideoPlayback sample    ?

 

Thanks.

The question for sample

March 12, 2013 - 11:15pm #10

You're welcome.

The question for sample

March 12, 2013 - 10:56pm #9

Thanks AlessandroB its working fine now :)

The question for sample

March 12, 2013 - 6:50am #8

The question for sample

March 12, 2013 - 6:46am #7

Hi AlessandroB,

 

can you please give me steps for ndk-build ?

 

Thanks

The question for sample

March 12, 2013 - 6:10am #6

DId you run ndk-build ? was the build successfull ? (and di you refresh the project in Eclipse after building with ndk-build ?)

 

The question for sample

March 12, 2013 - 5:53am #5

Hi AlessandroB,

 

thanks for reply ,

i have followed below

- you need to select Properties / Java Build Path / Order and Exportand make sure to check (tick) the checkbox for QCAR_SDK_ROOT; then press Apply/OK and clean/rebuild the project.

 

but still i am getting 

 

03-12 05:56:34.324: E/QCAR(2982): The library libQCAR.so could not be loaded
03-12 05:56:34.333: E/QCAR(2982): The library libVideoPlayback.so could not be loaded
 
03-12 05:56:42.473: E/AndroidRuntime(2982): FATAL EXCEPTION: main
03-12 05:56:42.473: E/AndroidRuntime(2982): java.lang.UnsatisfiedLinkError: Native method not found: com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.setActivityPortraitMode:(Z)V
03-12 05:56:42.473: E/AndroidRuntime(2982): at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.setActivityPortraitMode(Native Method)
03-12 05:56:42.473: E/AndroidRuntime(2982): at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.initApplication(VideoPlayback.java:1025)
03-12 05:56:42.473: E/AndroidRuntime(2982): at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.updateApplicationStatus(VideoPlayback.java:741)
03-12 05:56:42.473: E/AndroidRuntime(2982): at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.onCreate(VideoPlayback.java:350)
03-12 05:56:42.473: E/AndroidRuntime(2982): at android.app.Activity.performCreate(Activity.java:5104)
03-12 05:56:42.473: E/AndroidRuntime(2982): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
 

 Thanks.

The question for sample

March 11, 2013 - 11:39pm #4

Hi, the cause can likely be one of these two:

  • you did not run ndk-build, or
  • you need to select Properties / Java Build Path / Order and Exportand make sure to check (tick) the checkbox for QCAR_SDK_ROOT; then press Apply/OK and clean/rebuild the project.

​For a complete check-list for this kind of errors, also check this article:

https://developer.vuforia.com/forum/faq/android-how-do-i-fix-my-compile-or-runtime-errors

 

The question for sample

March 11, 2013 - 10:50pm #3

 

i use VideoPlayback sample and i am trying to run but i am getting below exception

 

 

FATAL EXCEPTION: 
main
03-12 10:57:57.675: E/AndroidRuntime(2626): 
java.lang.UnsatisfiedLinkError: setActivityPortraitMode
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.setActivityPortraitMode(Native Method)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.initApplication(VideoPlayback.java:1025)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.updateApplicationStatus(VideoPlayback.java:741)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at com.qualcomm.QCARSamples.VideoPlayback.VideoPlayback.onCreate(VideoPlayback.java:350)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2633)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2685)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.app.ActivityThread.access$2300(ActivityThread.java:126)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2038)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.os.Handler.dispatchMessage(Handler.java:99)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.os.Looper.loop(Looper.java:123)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at android.app.ActivityThread.main(ActivityThread.java:4633)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at java.lang.reflect.Method.invokeNative(Native Method)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at java.lang.reflect.Method.invoke(Method.java:521)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-12 10:57:57.675: E/AndroidRuntime(2626): 
at dalvik.system.NativeStart.main(Native Method)
03-12 10:57:57.695: W/ActivityManager(175):   Force finishing activity com.qualcomm.QCARSamples.VideoPlayback/.VideoPlayback
 

 

Please let me know where i am wrong. 

 

Thanks in advance..

Re: The question for sample

April 22, 2012 - 7:02am #2

Be sure to run ndk-build so that the native libraries are included w/ your project. Also run Project > Clean in Eclipse to ensure that they're incorporated into your build.

java.lang.UnsatisfiedLinkError arises when a native method is not defined or accessible from Java.

Topic locked