Start a new topic

Issue with startVideoPlayer

Issue with startVideoPlayer


dear all,

 

I try to open a video with IR recognition. I use the SampleIRExample project to test that. So I made these changes :

 

 

function showVideoHub()

{   

    AR.context.startVideoPlayer(videoPath + "hub.mp4");

}

 

 

trackable2DObject = new AR.Trackable2DObject(logoTracker, "WikitudeLogo", { drawables: { cam: overlay}, onEnterFieldOfVision:showVideoHub});

 

When the video is shown, I hit the "done" button to close the native player and I try to open the same video with the same IR and the app freeze/crash... 

 

The associed log file:

 

 

2012-11-20 19:00:25.895 SimpleIRExample INFO/AR(2815) 2012-11-20 19:00:25: QCAR SDK version 1.5.9

2012-11-20 19:00:26.185 SimpleIRExample DEBUG/AR(2815) UIView has CAEAGLLayer class

2012-11-20 19:00:26.192 SimpleIRExample DEBUG/AR(2815) UIView responds to selector renderFrameQCAR

2012-11-20 19:00:28.485 SimpleIRExample *** - - videoSettings dictionary contains one or more unsupported (ignored) keys: (

    Width,

    AVVideoScalingModeKey,

    Height

)

2012-11-20 19:00:28.497 SimpleIRExample INFO/AR(2815) 2012-11-20 19:00:28: ImageTracker: Successfully created dataset

Nov 20 19:00:41 iPhone SimpleIRExample <Error>: CGContextSaveGState: invalid context 0x0

Nov 20 19:00:41 iPhone SimpleIRExample <Error>: CGContextClipToRect: invalid context 0x0

Nov 20 19:00:41 iPhone SimpleIRExample <Error>: CGContextTranslateCTM: invalid context 0x0

Nov 20 19:00:41 iPhone SimpleIRExample <Error>: CGContextDrawShading: invalid context 0x0

Nov 20 19:00:41 iPhone SimpleIRExample <Error>: CGContextRestoreGState: invalid context 0x0

2012-11-20 19:00:41.914 SimpleIRExample Autoplay: Disabling autoplay for pause

2012-11-20 19:00:41.938 SimpleIRExample Autoplay: Disabling autoplay

2012-11-20 19:00:42.203 SimpleIRExample Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 0)

2012-11-20 19:00:42.210 SimpleIRExample Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 0)

2012-11-20 19:00:43.178 SimpleIRExample Autoplay: Enabling autoplay

2012-11-20 19:00:43.310 SimpleIRExample Autoplay: Likely to keep up or full buffer: 0

2012-11-20 19:00:43.313 SimpleIRExample Autoplay: Skipping autoplay, not enough buffered to keep up.

2012-11-20 19:00:43.367 SimpleIRExample Prioritization requested for media item ID: 0

 

Dear Wolfgang,

It's seems that the context is missing when the native video player is launching.

 

Please find the modified SimpleIRSample project:

 



 

https://dl.dropbox.com/u/1831552/SimpleIRSample.zip

 

 

Olivier.

Hi Andreas,

 

 

Thanks for your answer. But how can I make sure that the initialization is only done by the presenting ViewController and not while the video is presenting ? Do I need to create a particular ViewControler for the video ?

 

Ok, I need to use the delegate to get the function urlWasInvoked called. But I also need to open some videos so I use AR.context.startVideoPlayer() in the ARchitect world. Each time this function is called (in a very dummy sample), I get this kind of errors :

 

SimpleIRExample <Error>: CGContextSaveGState: invalid context 0x0

SimpleIRExample <Error>: CGContextClipToRect: invalid context 0x0

SimpleIRExample <Error>: CGContextTranslateCTM: invalid context 0x0

SimpleIRExample <Error>: CGContextDrawShading: invalid context 0x0

SimpleIRExample <Error>: CGContextRestoreGState: invalid context 0x0

 

 

The result : the app is crashing when it come back from the background mode. I really need your help :)

regards,

Olivier.

Hi Olivier,

thanks for sharing the project. We'll have a look at it this week.

hello,

 

Some help please :)

When the app enter in background, the debugger says :

 

 

libGPUSupportMercury.dylib`gpus_ReturnNotPermittedKillClient:

0x36721e18:  movw   r1, #48879

0x36721e1c:  movs   r0, #1

0x36721e1e:  movt   r1, #57005

0x36721e22:  str    r1,

0x36721e24:  bx     lr

0x36721e26:  nop  

 

This is caused by an OpenGL ES call but why !?

Dear Wolfgang,

Have you looked at the problem?

Olivier.

Hi Olivier,

please have a look when you initialize your WTARchitectView and when you're loading your ARchitect World.

When the video will be presented and later on dismissed, the viewWillAppear, viewDidAppear, viewWillDisappear, viewDidDisappear methods are called. Please make sure that your initialization of WTARchitectView and the ARchitect World is only loaded when you're loading the presenting ViewController and not while you're presenting a video.

 

Best regards

Andreas
Login or Signup to post a comment