视频流通过http在黑莓 [英] video streaming over http in blackberry

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

问题描述

而我是通过HTTP搜索视频播放器,我发现这是位于这个网址的文章;

while i was searching video player over http, i found the article which is located at this url;

<一个href=\"http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Stream\" rel=\"nofollow\">http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Stream ing_media _-_ Start_to_finish.html NODEID = 2456737&放大器;已经RNUM = 0

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Stream ing_media_-_Start_to_finish.html?nodeid=2456737&ve rnum=0

我可以通过添加运行; deviceside =真正的在URL的末尾。它在jde4.5模拟器工作正常。它会从我的本地服务器3GP视频。我测试了580KB的文件和工作正常。但是当我从我的服务器(不是本地的,真实服务器)获取相同的文件我有大的文件(如580 KB)问题。它起着180KB的文件(但有时它并无法播放该文件),但不能起到580KB文件。而且我部署我的应用程序到我的9000设备,它有时扮演小文件(180KB),但从来不玩大文件(580KB)。

i can run by adding ";deviceside=true" at the end of url. it works fine in the jde4.5 simulator. it gets 3gp videos from my local server. i tested with 580kb files and works fine. but when i get the same file from my server (not local, real server) i have problems with big files (e.g 580 kb). it plays 180kb files (but sometimes it does not play this file either) but not plays 580kb file. and also i deployed my application to my 9000 device it sometimes plays small file (180kb) but never plays big file (580kb).

为什么它扮演如果是在我的本地文件,而不是在现实世界中玩?

why it plays if it is on my local file, not play in real world?

我已经stucked了好几天。希望大家帮我。

i ve stucked for days. hope you help me.

以及在URL中的code下面给出的是不行的,只有code我已经找到是上面。

and also the code at the url given below is not work, the only code i ve found is the above.

blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To _-_ Play_video_within_a_BlackBerry_smartphone_appli cation.html NODEID = 1383173&放大器; vernum = 0

blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To _-_Play_video_within_a_BlackBerry_smartphone_appli cation.html?nodeid=1383173&vernum=0

顺便说一句,没有CircularByteBuffer类的方法,如调整大小(长参数)。所以我评论relavent线(buffer.resize(buffer.getSize()+(buffer.getSize()*百分比/ 100));如下图所示。

btw, there is no method such as resize(long param) of CircularByteBuffer class. so i comment relavent line (buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100)); as shown below.

public void increaseBufferCapacity(int percent) {
    if(percent < 0){
        log(0, "FAILED! SP.setBufferCapacity() - " + percent);
        throw new IllegalArgumentException("Increase factor must be positive..");
    }
    synchronized(readLock){
        synchronized(connectionLock){                
            synchronized(userSeekLock){
                synchronized(mediaIStream){                
                    log(0, "SP.setBufferCapacity() - " + percent);        
                    //buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100));
                    this.bufferCapacity = buffer.getSize();
                }
            }
        }
    }
}

先谢谢了。

推荐答案

通过使用; deviceside =真正的你的网址,你告诉该设备使用直接TCP传输的连接。在CDMA设备(和模拟器),这将正常工作原样,但在GSM设备,你需要指定一个APN。它可能已经在设备设置中配置(在选项 - > TCP),但往往不是,它没有配置。在这种情况下,你需要将其添加到URL按<一个href=\"http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To_-_Specify_APN_information_for_a_direct_TCP_connection.html?nodeid=1265025&vernum=0\"相对=nofollow>此知识库文章。

By using ";deviceside=true" on your URL you are telling the device to use the Direct TCP transport for your connection. On CDMA devices (and simulators) this will work fine as-is, but on GSM devices you need to specify an APN. It may already be configured in the device settings (under Options->TCP) but more often than not, it is not configured. In this case, you need to add it to the URL as per this KB article.

不幸的是,如果你计划支持多个运营商也可以是单调乏​​味的(和支持的噩梦),以尝试并获得的APN适合所有的人。在这种情况下,你可能想使用BIS传输,这使得事情变得更加简单,因为没有APN。然而,你需要加入RIM的联盟计划以访问BIS。

Unfortunately, if you plan on supporting multiple carriers it can be tedious (and a support nightmare) to try and get the APNs right for all of them. In this case you may want to use the BIS transport, which makes things much easier because there's no APN. However, you'll need to join RIM's Alliance program to get access to BIS.

在网络传输的信息可以在<一个找到href=\"http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is_-_Different_ways_to_make_an_HTTP_or_socket_connection.html?nodeid=826935&vernum=0\"相对=nofollow>此知识库文章。

More information on network transports can be found in this KB article.

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

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