1. <nobr id="easjo"><address id="easjo"></address></nobr>

      <track id="easjo"><source id="easjo"></source></track>
      1. 
        

      2. <bdo id="easjo"><optgroup id="easjo"></optgroup></bdo>
      3. <track id="easjo"><source id="easjo"><em id="easjo"></em></source></track><option id="easjo"><span id="easjo"><em id="easjo"></em></span></option>
          貴州做網站公司
          貴州做網站公司~專業!靠譜!
          10年網站模板開發經驗,熟悉國內外開源網站程序,包括DEDECMS,WordPress,ZBlog,Discuz! 等網站程序,可為您提供網站建設,網站克隆,仿站,網頁設計,網站制作,網站推廣優化等服務。我們專注高端營銷型網站,企業官網,集團官網,自適應網站,手機網站,網絡營銷,網站優化,網站服務器環境搭建以及托管運維等。為客戶提供一站式網站解決方案?。?!

          pvplayer(OpenCores學習–PVPlayer 引擎設計[親測有效])

          來源:互聯網轉載 時間:2024-01-23 14:24:21

          OpenCores學習–PVPlayer 引擎設計[親測有效]-

          OpenCores學習(3)–PVPlayer 引擎設計[親測有效]PVPlayer引擎是PVPlayerSDK的心臟。它接收和處理所有PVPlayerSDK從用戶和管理PVMF播放多媒體所需的組成及相關業務的請求。其任務應用和簡化高級控制。這個PVPlayer引擎也偵測,處理,和過濾事件和信息生成多媒體播放操作控制。3

          PVPlayer引擎是PVPlayer SDK的心臟。它接收和處理所有PVPlayer SDK從用戶和管理PVMF播放多媒體所需的組成及相關業務的請求。其任務應用和簡化高級控制。這個PVPlayer引擎也偵測,處理,和過濾事件和信息生成多媒體播放操 作控制。

          3.1 PVPlayerInterface API

          PVPlayer用戶界面PVPlayer引擎通過PVPlayerInterface接口類來確定是否有一種適配接口用 戶和PVPlayer引擎。PVPlayerInterface是一種OSCL-based接口和遵循公共接口,除了多媒體播放特定api,PVPlayerInterface提供方法檢索SDK信息、操縱和取消的命令。并描述PVPlayerInterface API,指的是一種PVPlayerInterface API文檔生成的支持的標記。

          3.2異步操作

          The PVPlayer engine processes most commands initiated by API calls asynchronously. There are some commands that are processed synchronously and they can be differentiated by the return value. Synchronous commands return a PVMF status code which tells the user whether the command succeeded or not and if it did fail, what the error was. All asynchronous commands return a command ID. For the user to be notified of asynchronous command completion, the user must specify a callback handler when instantiating PVPlayer engine via the factory function. When the asynchronous command completes, PVPlayer engine calls the callback handler with the command ID for the command, command status, and any other relevant data. To process the command asynchronously, the PVPlayer engine is implemented as an active object, which gets to run according to the active scheduler running in the thread. The PVPlayer engine expects scheduler to be available when instantiated and the engine itself will not directly create a thread or scheduler.

          With asynchronous commands, there is a possibility of commands not completing in expected time. To deal with this issue, PVPlayer engine provides standard PV SDK APIs to cancel a specific or all issued commands. The user of PVPlayer SDK can use these APIs to cancel any request that did not complete in time or are not needed due to changing circumstances. In PVPlayer engine, it might have to deal with lower level components that behave asynchronously. To prevent an unresponsive lower level component from blocking PVPlayer engine operation, PVPlayer engine has timeout handling for any asynchronous commands that it issues. When timeout does occur, the asynchronous command is canceled and is handled appropriately (e.g. command failure, error event).

          3.3事件處理

          The PVPlayer engine notifies the user of errors and other information not related to API calls as unsolicited events. The notification is handled by making a callback on handlers specified by the user of PVPlayer engine. There are two callback handlers, one for error events and one for informational events, that must be specified by the user when instantiating PVPlayer engine via the factory function.

          3.4引擎框架

          下面的圖表說明了應用程序使用PVPlayer引擎的接口PVPlayerInterface時直接適配。PVPlayerFactory處理實例化組件和destory的PVPlayerEngine對象。所有PVPlayer引擎的api提供PVPlayerInterface。PVPlayerEngine采用三種回收處理過的應用,PVCommandStatusObserver,PVInformationalObserver,PVErrorEventObserver,通知申請上述指令完成同步誤差和信息的事件。

          引擎設計” alt=”OpenCores學習(3)–PVPlayer?引擎設計”>

          圖二類圖

          3.5狀態機

          引擎設計” alt=”OpenCores學習(3)–PVPlayer?引擎設計”>



          圖三狀態機

          PVPlayer引擎實例化后狀態為IDLE,在IDLE狀態時,可以調用AddDataSource()來指定需要回放的多媒體 數據,然后調用init()初始化數據并且狀態轉為INITIALIZED,在進入INITIALIZED

          狀態的時候,用戶可以獲取媒體的tracks和metadata,并且可以調用AddDataSink()去指定具體的data sinks去回放.

          在所有的data sinks添加后,用戶調用Prepare(),使引擎建立相關的PVMF節點,并為數據流指定多媒體播放的數據源 和數據接收器,建立需要播放的數據流隊列.用戶在PREPARED狀態時調用Start()進入到STARTED狀態,啟動多媒體播放.在調用Stop()后回到INITIALIZED狀態并且刷新多媒體數據流.

          在STARTED狀態時,用戶也可以調用Pause(). Stop().調用Stop()后停止回放,刷新所有數據流,并且使引擎回到初始化狀態.調用Pause(),會停止回放,但不會刷新數據流,而且可以調用Resume()繼續從暫停的地方播放.在PAUSED狀態時可以調用Stop()使引擎回到初始化狀態.

          調用Stop()回到INITIALIZED狀態后,數據隊列可以通過調用AddDataSink()和RemoveDataSink()來添加和刪除.在調用Prepare()\Start()重新回放,但是關閉回到IDLE狀態時,或需要重新打開另一個媒體文件時,需要調用Reset().因為在IDLE狀態調用RemoveDataSink()不能刪除所有數據隊列.調用Reset()后,又回到起始狀態,流程如上一樣.如果用戶想退出PVPlayer,也可以調用Reset(),在PREPARED, STARTED,PAUSED狀態時都可以調用該函數.

          如果PVPlayer引擎收到錯誤信息或從其它組件傳來 錯誤事件后,引擎會發送ERROR狀態并且嘗試恢復.如果這個錯誤是不可恢復的,剛引擎會清空所有狀態和數據列回到IDLE狀態.此時用戶應該等待PVMFInfoErrorHandlingComplete informational event.

          以上是這個狀態機的簡要 描述,具體參考OPENCORE源碼.

          c語言中正確的字符常量是用一對單引號將一個字符括起表示合法的字符常量。例如‘a’。數值包括整型、浮點型。整型可用十進制,八進制,十六進制。八進制前面要加0,后面...

          2022年天津專場考試原定于3月19日舉行,受疫情影響確定延期,但目前延期后的考試時間推遲。 符合報名條件的考生,須在規定時間登錄招考資訊網(www.zha...

          :喜歡聽,樂意看。指很受歡迎?!巴卣官Y料”喜聞樂見:[ xǐ wén lè jiàn ]詳細解釋1. 【解釋】:喜歡聽,樂意看。指很受歡迎。2. 【示例】:這是...

          創新在企業中的作用是什么?沒有創新就沒有競爭力,沒有創新就沒有價值提升。無論是哪種形式的創新,都需要認真的工作態度和務實的工作作風。企業采用新的生產方式和管理模式,應用創新技術、新知識、新工藝,提高產品質量,開發生產新產品,占領市場,改進新服務,實現市場價值。技術創新在改進產品的生產方法和過程中起著重要的作用。創新還可以促進企業組織形式和管理效率的提高,使企業適應經濟發展的要求,不斷提高效率。公司...

          為了響應改革強軍的命令,取消了軍隊文工團的編制。有著68年輝煌歷史的空政藝團從此走入歷史。他們以自己堅定的行動堅持和支持改革,一聲令下聽黨指揮,展現了黨的文藝戰士的真正忠誠。68年來,一代又一代空軍旅作家藝術家創作演繹了生動感人的空軍旅故事,唱響了催人奮進的軍歌,留下了不可磨滅的空軍旅記憶?!拔覑圩鎳乃{天,晴朗空萬里晴空。白云為我鋪路,東風送我飛向前……”悠揚的旋律唱了幾十年,空部隊的人都耳熟能...

          有關2021端午節是幾月幾號 今年端午節是什么時候方面的知識,估計很多人不是太了解,今天就給大家詳細的介紹一下關于2021端午節是幾月幾號 今年端午節是什么時候的相關內容。(相關資料圖)2021端午節是幾月幾號2021端午節時間:2021年06月14日星期一(農歷辛丑年(牛年)五月初五)。端午節與春節、清明節、中秋節并稱為中國四大傳統節日。端午文化在世界上影響廣泛,世界上一些國家和地區也有慶賀端午...

          TOP
          国产初高中生视频在线观看|亚洲一区中文|久久亚洲欧美国产精品|黄色网站入口免费进人
          1. <nobr id="easjo"><address id="easjo"></address></nobr>

              <track id="easjo"><source id="easjo"></source></track>
              1. 
                

              2. <bdo id="easjo"><optgroup id="easjo"></optgroup></bdo>
              3. <track id="easjo"><source id="easjo"><em id="easjo"></em></source></track><option id="easjo"><span id="easjo"><em id="easjo"></em></span></option>