Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 42
Registered: ‎01-05-2011
My Device: Not Specified

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

Hey All,

 

I'm getting this err trying to play a local video, standalone through Flash Builder Burrito (ie Not through the Simulator):

 

VerifyError: Error #1014: Class qnx.pps::smileytongue:PSChannel could not be found

 

Here's my code:

videoDisplay = new VideoDisplay();
videoPlayer = new MediaPlayer("video/myvideo.f4v",videoDisplay);	

 

 

Any ideas what the problem is? Is it a video format issue? I also tried steaming the video remotely and through the simulator (which I believe is not supported yet) but not dice.

 

Thanks in Advance,

 

SMJOHN

 

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

Any PPSChannel error has to do with the SDK trying to communicate to a service that is running in the backgroun of the OS.  In AIR, those services are not available.  Makes testing diffilcult if not impossible, so you many need to run on the simulator to test those features.  Device and Alert have the same issue.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

What John said...

 

What I haven't seen is anyone suggesting it might be possible to "mock" those missing classes in some fashion.  How easy is it to whip up a qnx.pps.PPSChannel object and with some trial and error, checking the tracebacks, implement stub routines for all the missing parts until it no longer complains.

 

I've done this sort of thing many times with Python, which is a completely dynamic language.  Is ActionScript dynamic enough that this is feasible?  (That is, if I wrote a qnx/pps/PPSChannel.as package, could I get it to be included in my .swf so that it would be found when run locally on AIR?)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

Probably not totally possible.  The class exists in the library, it is just trying to call a service that does not exist.  Assuming you could get all the API's correct, swapping out that class in an existing library and having all the other API's recognize that within the same library tree, I dont think it is possible.  I've never tried it though.  Let's give @jrab 30-45 seconds to get it to work.  The clock starts..... now.

 

The best solution is to have some kind of fake AIR runtime that these classes can actually call.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

John, you may be right, but the error 1014 means "class not found", which I would have guessed means that it is not actually present in the library.

 

Maybe I'll give it a shot... might teach me some useful skillz...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

The PPSChannel class is in the qnx-air library file under qnx.pps.PPSChannel.  It has the following public methods:

 

connect

disconnect

registerHandler

sendMsg

cancelRequest

sendResponse

 

Now since it is probably a socket connection, maybe someone could try to sniff it out and create a proxy or faux service to give a dummy reply so people dont get the runtime error??

 

 

 

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

 


jtegen wrote:

The PPSChannel class is in the qnx-air library file under qnx.pps.PPSChannel.  ...

Now since it is probably a socket connection, maybe someone could try to sniff it out and create a proxy or faux service to give a dummy reply so people dont get the runtime error??


Weird that it says "class not found" if it's in the library.  But those levels of ActionScript are still opaque to me.

 

I doubt the PPS stuff uses a socket, though.  The PPS service is a very cool memory-based filesystem invented by QNX, which uses regular file operations.  Multiple processes can monitor one or more of these "files" for changes, and anything written to them is shared with all listeners.  More than that, when you open a file you get its latest state (even if you weren't connected when it was last updated), and the state is also persisted on shutdown (thus the first "P" in the name).  I think that means the PPSChannel class is effectively just managing one or more open file handles, listening asynchronously for changes (maybe the Posix select() call).

 

Search for "Playbook PPS service" to find some links to background material on it. :smileyhappy:

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

Sounds like they uses unix pipes to do that.  Sounds cool how you describe it.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

These things are way better than pipes.  The data is more structured than with pipes, and you can have multiple simultaneous writers and/or readers.  They're a complete publish-subscribe mechanism, pretty analogous to addEventListener() and the corresponding handlers, but they work across processes, as well as having the persistence feature.  I just can't wait to see what we learn about them in the next SDK.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PPSChannel error while attempting to playing a local video using QNX MediaPlayer

Very cool.