Note that there are some explanatory texts on larger screens.

plurals
  1. POPlaying an InputStream video in Blackberry JDE
    primarykey
    data
    text
    <p>I think I'm using InputStream incorrectly with a Blackberry 9000 simulator:</p> <p>I found some sample code, </p> <p><a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To_-_Play_video_within_a_BlackBerry_smartphone_application.html?nodeid=1383173&amp;vernum=0" rel="nofollow noreferrer">http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To_-_Play_video_within_a_BlackBerry_smartphone_application.html?nodeid=1383173&amp;vernum=0</a></p> <p>that lets you play video from within a Blackberry App. The code claims it can handle HTTP, but it's taken some fandangling to get it to actually approach doing so:</p> <p><a href="http://pastie.org/609491" rel="nofollow noreferrer">http://pastie.org/609491</a></p> <p>Specifically, I'm doing:</p> <pre><code> StreamConnection s = null; s = (StreamConnection)Connector.open("http://10.252.9.15/eggs.3gp"); HttpConnection c = (HttpConnection)s; InputStream i = c.openInputStream(); System.out.println("~~~~~I have a connection?~~~~~~" + c); System.out.println("~~~~~I have a URL?~~~~" + c.getURL()); System.out.println("~~~~~I have a type?~~~~" + c.getType()); System.out.println("~~~~~I have a status?~~~~~~" + c.getResponseCode()); System.out.println("~~~~~I have a stream?~~~~~~" + i); player = Manager.createPlayer(i, c.getType()); </code></pre> <p>I've found that this is the only way I can get an InputStream from an HTTPConnection without causing a: "JUM Error 104: Uncaught NullPointer Exception". (That is, the casting as a StreamConnection, and THEN as an HttpConnection stops it from crashing).</p> <p>However, I'm still not streaming video. Before, a stream wasn't able to be created (it would crash with the null pointer exception). Now, a stream is being made, the debugger claims it's begining to stream video from it...and nothing happens. No video plays.</p> <p>The app doesn't freeze, or crash or anything. I can 'pause' and 'play' freely, and get appropriate debug messages for both. But no video shows up. </p> <p>If I'm playing a video stored locally on the blackberry, everything is fine (it actually plays the video), so I know the Player itself is working fine, I"m just wondering if maybe I have something wrong with my stream?</p> <p>The API says the player can take in an InputStream. Is there a specific kind it needs? How can I query my inputstream to know if it's valid? It existing is further than I've gotten before.</p> <p>-Jenny</p> <p>Edit: I'm on a Blackberry Bold simulator (9000). I've heard that some versions of phones do NOT stream video via HTTP, however, the Bold does. I have yet to see examples of this though. When I go to the internet and point at a blackberry playable video, it attempts to stream, and then asks me to physically download the file (and then plays fine once I download).</p> <p>Edit: Also, I have a physical blackberry Bold, as well, but it can't stream either (I've gone to m.youtube.com, only to get a server/content not found error). Is there something special I need to do to stream RTSP content?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload