日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

WebRTC详解-zz

發布時間:2025/4/9 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 WebRTC详解-zz 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、WebRTC目的

WebRTC(Web Real-Time Communication)項目的最終目的主要是讓Web開發者能夠基于瀏覽器(Chrome\FireFox\...)
輕易快捷開發出豐富的實時多媒體應用,而無需下載安裝任何插件,Web開發者也無需關注多媒體的數字信號處理過程,
只需編寫簡單的Javascript程序即可實現,W3C等組織正在制定Javascript 標準API,目前是WebRTC 1.0版本,Draft狀態,網址;
另外WebRTC還希望能夠建立一個多互聯網瀏覽器間健壯的實時通信的平臺,形成開發者與瀏覽器廠商良好的生態環境。
同時,Google也希望和致力于讓WebRTC的技術成為HTML5標準之一,可見Google布局之深遠。

2、WebRTC架構圖

架構圖顏色標識說明: (1)紫色部分是Web開發者API層; (2)藍色實線部分是面向瀏覽器廠商的API層(也就是紅色框標內模塊,也是本人專注研究的部分) (3)藍色虛線部分瀏覽器廠商可以自定義實現

3、WebRTC架構組件介紹

(1) Your Web App
Web開發者開發的程序,Web開發者可以基于集成WebRTC的瀏覽器提供的web API開發基于視頻、音頻的實時通信應用。 (2)?Web API
面向第三方開發者的WebRTC標準API(Javascript),
使開發者能夠容易地開發出類似于網絡視頻聊天的web應用,最新的標準化進程可以查看這里。

(3)?WebRTC Native C++ API
本地C++ API層,使瀏覽器廠商容易實現WebRTC標準的Web API,抽象地對數字信號過程進行處理。 (4)?Transport / Session 傳輸/會話層 會話層組件采用了libjingle庫的部分組件實現,無須使用xmpp/jingle協議

a. ?RTP Stack協議棧
Real Time Protocol

b. ?STUN/ICE
可以通過STUN和ICE組件來建立不同類型網絡間的呼叫連接。

c. ?Session Management
一個抽象的會話層,提供會話建立和管理功能。該層協議留給應用開發者自定義實現。 (5)?VoiceEngine
音頻引擎是包含一系列音頻多媒體處理的框架,包括從視頻采集卡到網絡傳輸端等整個解決方案。
PS:VoiceEngine是WebRTC極具價值的技術之一,是Google收購GIPS公司后開源的。
在VoIP上,技術業界領先,后面的文章會詳細了解 a. ?iSAC Internet Speech Audio Codec 針對VoIP和音頻流的寬帶和超寬帶音頻編解碼器,是WebRTC音頻引擎的默認的編解碼器
采樣頻率:16khz,24khz,32khz;(默認為16khz)
自適應速率為10kbit/s ~ 52kbit/;
自適應包大小:30~60ms;
算法延時:frame + 3ms b. ?iLBC
Internet Low Bitrate Codec
VoIP音頻流的窄帶語音編解碼器
采樣頻率:8khz;
20ms幀比特率為15.2kbps
30ms幀比特率為13.33kbps
標準由IETF RFC3951和RFC3952定義
c. ?NetEQ for Voice 針對音頻軟件實現的語音信號處理元件 NetEQ算法:自適應抖動控制算法以及語音包丟失隱藏算法。使其能夠快速且高解析度地適應不斷變化的網絡環境,確保音質優美且緩沖延遲最小。 是GIPS公司獨步天下的技術,能夠有效的處理由于網絡抖動和語音包丟失時候對語音質量產生的影響。 PS:NetEQ 也是WebRTC中一個極具價值的技術,對于提高VoIP質量有明顯效果,加以AEC\NR\AGC等模塊集成使用,效果更好。 d. ?Acoustic Echo Canceler (AEC)
回聲消除器是一個基于軟件的信號處理元件,能實時的去除mic采集到的回聲。 e. ?Noise Reduction (NR)
噪聲抑制也是一個基于軟件的信號處理元件,用于消除與相關VoIP的某些類型的背景噪聲(嘶嘶聲,風扇噪音等等… …) (6)?VideoEngine
WebRTC視頻處理引擎
VideoEngine是包含一系列視頻處理的整體框架,從攝像頭采集視頻到視頻信息網絡傳輸再到視頻顯示整個完整過程的解決方案。 a. ?VP8
視頻圖像編解碼器,是WebRTC視頻引擎的默認的編解碼器
VP8適合實時通信應用場景,因為它主要是針對低延時而設計的編解碼器。
PS:VPx編解碼器是Google收購ON2公司后開源的,VPx現在是WebM項目的一部分,而WebM項目是Google致力于推動的HTML5標準之一 b. ?Video Jitter Buffer
視頻抖動緩沖器,可以降低由于視頻抖動和視頻信息包丟失帶來的不良影響。 c. ?Image enhancements
圖像質量增強模塊
對網絡攝像頭采集到的圖像進行處理,包括明暗度檢測、顏色增強、降噪處理等功能,用來提升視頻質量。

4、WebRTC核心模塊API

(1)、網絡傳輸模塊:libjingle

WebRTC重用了libjingle的一些組件,主要是network和transport組件,關于libjingle的文檔資料可以查看這里。

(2)、音頻、視頻圖像處理的主要數據結構 常量\VideoEngine\VoiceEngine ? 注意:以下所有的方法、類、結構體、枚舉常量等都在webrtc命名空間里??

類、結構體、枚舉常量

頭文件

說明

Structures

common_types.h

Lists the structures common to the VoiceEngine & VideoEngine

Enumerators

common_types.h

List the enumerators common to the ?VoiceEngine & VideoEngine

Classes

common_types.h

List the classes common to VoiceEngine & VideoEngine

class?VoiceEngine

voe_base.h

How to allocate and release resources for the VoiceEngine using factory methods in the?VoiceEngine?class. It also lists the APIs which are required to enable file tracing and/or traces as callback messages

class?VideoEngine

vie_base.h

How to allocate and release resources for the VideoEngine using factory methods in the?VideoEngine?class. It also lists the APIs which are required to enable file tracing and/or traces as callback messages

(3)、音頻引擎(VoiceEngine)模塊 APIs

? 下表列的是目前在 VoiceEngine中可用的sub APIs
sub-API

頭文件

說明

VoEAudioProcessing

voe_audio_processing.h

Adds support for Noise Suppression (NS), Automatic Gain Control (AGC) and Echo Control (EC). Receiving side VAD is also included.

VoEBase

voe_base.h

Enables full duplex VoIP using G.711.
NOTE:?This API must always be created.

VoECallReport

voe_call_report.h

Adds support for call reports which contains number of dead-or-alive detections, RTT measurements, and Echo metrics.

VoECodec

voe_codec.h

Adds non-default codecs (e.g. iLBC, iSAC, G.722 etc.), Voice Activity Detection (VAD) support.

VoEDTMF

voe_dtmf.h

Adds telephone event transmission, DTMF tone generation and telephone event detection. (Telephone events include DTMF.)

VoEEncryption

voe_encryption.h

Adds external encryption/decryption support.

VoEErrors

voe_errors.h

Error Codes for the VoiceEngine

VoEExternalMedia

voe_external_media.h

Adds support for external media processing and enables utilization of an external audio resource.

VoEFile

voe_file.h

Adds file playback, file recording and file conversion functions.

VoEHardware

voe_hardware.h

Adds sound device handling, CPU load monitoring and device information functions.

VoENetEqStats

voe_neteq_stats.h

Adds buffer statistics functions.

VoENetwork

voe_network.h

Adds external transport, port and address filtering, Windows QoS support and packet timeout notifications.

VoERTP_RTCP

voe_rtp_rtcp.h

Adds support for RTCP sender reports, SSRC handling, RTP/RTCP statistics, Forward Error Correction (FEC), RTCP APP, RTP capturing and RTP keepalive.

VoEVideoSync

voe_video_sync.h

Adds RTP header modification support, playout-delay tuning and monitoring.

VoEVolumeControl

voe_volume_control.h

Adds speaker volume controls, microphone volume controls, mute support, and additional stereo scaling methods.



(4)、視頻引擎(VideoEngine)模塊 APIs

下表列的是目前在 VideoEngine中可用的sub APIs

sub-API

頭文件

說明

ViEBase

vie_base.h

Basic functionality for creating a VideoEngine instance, channels and VoiceEngine interaction.

NOTE:?This API must always be created.

ViECapture

vie_capture.h

Adds support for capture device allocation as well as capture device capabilities.

ViECodec

vie_codec.h

Adds non-default codecs, codec settings and packet loss functionality.

ViEEncryption

vie_encryption.h

Adds external encryption/decryption support.

ViEErrors

vie_errors.h

Error codes for the VideoEngine

ViEExternalCodec

vie_external_codec.h

Adds support for using external codecs.

ViEFile

vie_file.h

Adds support for file recording, file playout, background images and snapshot.

ViEImageProcess

vie_image_process.h

Adds effect filters, deflickering, denoising and color enhancement.

ViENetwork

vie_network.h

Adds send and receive functionality, external transport, port and address filtering, Windows QoS support, packet timeout notification and changes to network settings.

ViERender

vie_render.h

Adds rendering functionality.

ViERTP_RTCP

vie_rtp_rtcp.h

Adds support for RTCP reports, SSRS handling RTP/RTCP statistics, NACK/FEC, keep-alive functionality and key frame request methods.

歡迎指出不對之處:zengxijin@qq.com /==================================================================================================================/ Author: zengxijin ? ?zengxijin@qq.com ? ? 歡迎轉載,請注明出處 原文地址:http://blog.csdn.net/temotemo /========================================================================================

轉載于:https://www.cnblogs.com/tan2016/p/5749184.html

總結

以上是生活随笔為你收集整理的WebRTC详解-zz的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。