自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

bada開發(fā):播放實(shí)時(shí)rtsp流

移動(dòng)開發(fā)
bada是三星公司自主開發(fā)的移動(dòng)操作系統(tǒng),它的特點(diǎn)是配置靈活、用戶交互性好、面向服務(wù),非常重視SNS集成和地理位置服務(wù)應(yīng)用。本文介紹了如何在bada平臺(tái)實(shí)現(xiàn)播放實(shí)時(shí)rtsp流。

bada是三星公司自主開發(fā)的移動(dòng)操作系統(tǒng),它的特點(diǎn)是配置靈活、用戶交互性好、面向服務(wù),非常重視SNS集成和地理位置服務(wù)應(yīng)用。bada的設(shè)計(jì)目標(biāo)是開創(chuàng)人人能用智能手機(jī)的時(shí)代。本文介紹了如何在bada平臺(tái)實(shí)現(xiàn)播放實(shí)時(shí)rtsp流。

使用Osp::Media::Player類

 

  1. The supported formats in streaming  
  2.  
  3. Video : H.264, H.263, MPEG4   
  4.  
  5. Audio : AMR-NB, AAC, AAC+, EAAC+  
  6.  
  7. The supported protocol in streaming  
  8.  
  9. RTSP  
  10.  
  11. {  
  12.  
  13.  
  14. __pPanel= new OverlayPanel();  
  15.  
  16. __pPanel->Construct(Rectangle(0,58,480,560));  
  17.  
  18. AddControl(*__pPanel);  
  19.  
  20. __pPlayer = new Player();  
  21.  
  22. Osp::Graphics::BufferInfo bufferInfo;  
  23.  
  24. r = __pPanel->GetBackgroundBufferInfo(bufferInfo);  
  25.  
  26. __pListener = new VideoPlayerListener;  
  27.  
  28. r = __pPlayer->Construct(*__pListener, &bufferInfo);  
  29.  
  30. VideoPlayerPlay();  
  31.  
  32. }  
  33.  
  34.  
  35.  
  36. void 
  37.  
  38. VideoPlayerForm::VideoPlayerPlay()  
  39.  
  40. {  
  41.  
  42. result r = E_SUCCESS;  
  43.  
  44. if(openFlag == false)  
  45.  
  46. {  
  47.  
  48. String resolveString(L"rtsp://***");  
  49.  
  50. Uri baseUri;  
  51.  
  52. baseUri.SetUri(resolveString);  
  53.  
  54. r = __pPlayer->OpenUrl(baseUri);  
  55.  
  56. r = __pPlayer->Play();  
  57.  
  58. openFlag = true;  
  59.  
  60. }  
  61.  
  62. else 
  63.  
  64. {  
  65.  
  66. AppLog("file being played");  
  67.  
  68. }  
  69.  
  70. }  
  71.  
  72. //因?yàn)椴シ诺氖菍?shí)時(shí)流媒體,暫停時(shí)直接停止,再次恢復(fù)時(shí)重新建立連接(調(diào)用VideoPlayerPlay())  
  73.  
  74. void 
  75.  
  76. VideoPlayerForm::VideoPlayerPause()  
  77.  
  78. {  
  79.  
  80. result r = E_SUCCESS;  
  81.  
  82. PlayerState nowState = __pPlayer->GetState();  
  83.  
  84. if(nowState == PLAYER_STATE_PLAYING)  
  85.  
  86. {  
  87.  
  88. AppLog("stop");  
  89.  
  90. r = __pPlayer->Stop();  
  91.  
  92. if(IsFailed(r))  
  93.  
  94. {  
  95.  
  96. AppLog(">>>>>> (VideoPlayer::VideoPlayerStop) Stop has failed: %s\n", GetErrorMessage(r));  
  97.  
  98. return;  
  99.  
  100. }  
  101.  
  102. r = __pPlayer->Close();  
  103.  
  104. if(IsFailed(r))  
  105.  
  106. {  
  107.  
  108. AppLog(">>>>>> (VideoPlayer::VideoPlayerStop) Close has failed: %s\n", GetErrorMessage(r));  
  109.  
  110. return;  
  111.  
  112. }  
  113.  
  114. openFlag = false;  
  115.  
  116. }  
  117.  
  118. else 
  119.  
  120. {  
  121.  
  122. AppLog("file does not play");  
  123.  
  124. }  
  125.  

【編輯推薦】

  1. 官方文檔:什么是bada?
  2. 官方文檔:bada API參考資料
  3. bada開發(fā)簡介:控件的使用
  4. 三星bada學(xué)習(xí)筆記:HelloWorld篇
  5. 從開發(fā)到售賣 三星bada應(yīng)用程序創(chuàng)建完整流程
責(zé)任編輯:佚名 來源: CSDN博客
相關(guān)推薦

2011-04-19 17:06:24

bada控件bada

2010-02-07 14:55:06

bada三星

2010-04-12 17:59:05

bada開發(fā)

2011-03-10 16:57:29

三星Symbianbada

2010-04-21 14:25:22

bada三星

2013-02-21 16:27:07

開源開源流計(jì)算

2010-02-14 15:27:25

2016-12-08 14:41:59

流處理器PaaStormKafka

2020-06-28 14:35:54

OBSWebSockets開源

2010-04-22 10:41:18

靜態(tài)庫bada

2011-08-10 15:58:58

iPhone視頻

2010-04-21 17:50:59

共享庫bada

2011-04-20 14:59:39

bada APIbada

2022-07-08 08:00:00

流混合開發(fā)Web

2013-08-14 10:48:23

實(shí)時(shí)計(jì)算流計(jì)算

2010-07-28 11:19:55

HelloWorldbada

2010-09-05 17:03:01

bada 1.0bada三星

2011-04-15 09:28:17

bada應(yīng)用程序

2011-09-22 10:10:56

2013-12-17 13:29:04

iOS開發(fā)多媒體
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號