在玩黑莓JDE的InputStream视频 [英] Playing an InputStream video in Blackberry JDE

查看:141
本文介绍了在玩黑莓JDE的InputStream视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得我用正确的InputStream与黑莓9000模拟器:

I think I'm using InputStream incorrectly with a Blackberry 9000 simulator:

我发现了一些样品code,

I found some sample code,

<一个href=\"http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How%5FTo%5F-%5FPlay%5Fvideo%5Fwithin%5Fa%5FBlackBerry%5Fsmartphone%5Fapplication.html?nodeid=1383173&vernum=0\" rel=\"nofollow\">http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How%5FTo%5F-%5FPlay%5Fvideo%5Fwithin%5Fa%5FBlackBerry%5Fsmartphone%5Fapplication.html?nodeid=1383173&vernum=0

这允许您从黑莓应用程序内播放视频。在code声称,它可以处理HTTP,但它采取了一些fandangling得到它实际上接近这样做的:

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:

http://pastie.org/609491

具体地说,我做的:

 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());

我发现,这是我可以从HttpConnection的一个InputStream而不会导致的唯一途径:JUM错误104:未捕获空指针异常。 (即,铸造作为的StreamConnection,然后作为一个HttpConnection的崩溃停止它)。

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).

不过,我仍然没有流视频。之前,流无法创建(它将与空指针异常崩溃)。现在,甲流正在取得,调试器声称它开始时,从它的视频流...并没有任何反应。没有视频播放。

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.

该应用程序也不会冻结或崩溃或任何东西。我可以'暂停'和'玩'自由,并获得相应的调试消息两者。但没有视频显示出来。

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.

如果我打的黑莓本地存储的视频,一切都很好(它实际上播放视频),所以我知道播放器本身工作正常,我米只是,如果可能我有什么不对我的疑惑流?

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?

的API表示,玩家可以在一个InputStream。有需要的特定类型的?我如何可以查询知道我的InputStream的,如果它是有效的?它现有的进一步比我以前得到。

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.

-Jenny

编辑:我在一个黑莓大胆模拟器(9000)。我听说手机的一些版本不通过HTTP视频流,然而,大胆做。我还没有看到这样的例子虽然。当我去到互联网,点黑莓可播放的视频,它试图流,然后问我在物理上下载的文件(再一次,我下载正常播放)。

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).

编辑:另外,我有一个物理黑莓Bold,为好,但它不能既流(我去了m.youtube.com,只得到一个未找到服务器/内容错误)。是不是有什么特别的,我需要做的RTSP流内容?

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?

推荐答案

所以,很长一段时间后,我已经确定,黑莓Bold 9000没有做HTTP流。我最后不得不(或相当雷不必的同事)写渐进式下载来模拟它的自定义方法。哦,好。

So, after a very long time I have determined that the Blackberry Bold 9000 does NOT do http streaming. I ended up having to (or rather a coworker of mine having to) write custom methods for progressive download to simulate it. Oh, well.

这篇关于在玩黑莓JDE的InputStream视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆