Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the proper way to stream HTTP video, or even to debug on a Blackberry simulator?
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/1393772/playing-an-inputstream-video-in-blackberry-jde">Playing an InputStream video in Blackberry JDE</a> </p> </blockquote> <p>I've seen a lot of different methods for doing so, but none of them are specific (and my attempts to implement them have all failed).</p> <p>Does there exist a known way to stream http video on a Blackberry? Sample code, tutorials, anything?</p> <p>The closest I've found is: <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>The above tutorial, but it has several problems:</p> <p>First, the sample code it gives is for a local video (which I can successfully play). It claims that "any valid URL" will work for HTTP streaming, but this is patently false, as supplying a known good .sgp URL does nothing. </p> <p>The createPlayer method has the ability to accept an InputStream, which sounded promising, so I modified the sample code to have the lines:</p> <pre><code> // player = Manager.createPlayer("file:///SDCard/eggs.3gp"); HttpConnection c = (HttpConnection)Connector.open("http://good-3gp-videos.com/viapic/e39903da6e5c1e1c5d572a49a88a99e6.3gp"); int rc = c.getResponseCode(); if (rc != HttpConnection.HTTP_OK) { throw new IOException("HTTP response code: " + rc); } player = Manager.createPlayer(c.openInputStream(), null); player.realize(); </code></pre> <p>Instead of the previous player created from a string (commented out in my source).</p> <p>This however, gets me the exact same problem (specifically, attempting to play the video gets me a "JUM Error 104: Uncaught NullPointer Exception". )</p> <p>It seems that both ways I attempt to read from a URL are getting me a Null response.</p> <p>This is my first Blackberry App, so I'm not very familiar with how to debug it (for example, several times there is a System.out.println() call in the sample code, but I never see it displayed on the console.</p> <p>How would I go about debugging the code, or alternatively, what is the correct way to stream HTTP video?</p> <hr> <p>Modifying the code slightly, (adding a cast to Stream Connection) gets rid of my null pointer error, but even though nothing crashes, and there are no exceptions, it's still not streaming.</p> <p>I have indeed heard that the simulators cannot stream, but putting the code on a phone doesn't work for me either.</p> <p>Even more confusing, neither my simulator or my actual phone can stream RTSP from m.youtube, which I've heard works. I get a server/content not found error. </p> <p>Is it possible that my workplace's firewall is preventing something important from happening?</p>
    singulars
    1. This table or related slice is empty.
    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