[关闭]
@chenlai89 2015-10-23T03:44:58.000000Z 字数 3831 阅读 2673

Webrtc Audio Engine

音频


AudioEngine Class

  1. .
  2. ├── voe_audio_processing.h
  3. ├── voe_base.h
  4. ├── voe_codec.h
  5. ├── voe_dtmf.h
  6. ├── voe_errors.h
  7. ├── voe_external_media.h
  8. ├── voe_file.h
  9. ├── voe_hardware.h
  10. ├── voe_neteq_stats.h
  11. ├── voe_network.h
  12. ├── voe_rtp_rtcp.h
  13. ├── voe_video_sync.h
  14. └── voe_volume_control.h

基础功能 Base

语音处理 Audio Processing

支持各个模块相应的配置。

音量控制

网络部分

配置网络接口发送接口 (回调形式),接收packet接口。

RTP/RTCP 配置

配置编解码

备注 : 有接口更改payload,码率等信息。

硬件接口

备注: 提供音频设备接口切换,设备ID等, 硬件AEC AGC NS 开关接口。

获取NetEQ信息

  1. struct NetworkStatistics // NETEQ statistics
  2. {
  3. // current jitter buffer size in ms
  4. uint16_t currentBufferSize;
  5. // preferred (optimal) buffer size in ms
  6. uint16_t preferredBufferSize;
  7. // adding extra delay due to "peaky jitter"
  8. bool jitterPeaksFound;
  9. // Loss rate (network + late); fraction between 0 and 1, scaled to Q14.
  10. uint16_t currentPacketLossRate;
  11. // Late loss rate; fraction between 0 and 1, scaled to Q14.
  12. uint16_t currentDiscardRate;
  13. // fraction (of original stream) of synthesized audio inserted through
  14. // expansion (in Q14)
  15. uint16_t currentExpandRate;
  16. // fraction (of original stream) of synthesized speech inserted through
  17. // expansion (in Q14)
  18. uint16_t currentSpeechExpandRate;
  19. // fraction of synthesized speech inserted through pre-emptive expansion
  20. // (in Q14)
  21. uint16_t currentPreemptiveRate;
  22. // fraction of data removed through acceleration (in Q14)
  23. uint16_t currentAccelerateRate;
  24. // fraction of data coming from secondary decoding (in Q14)
  25. uint16_t currentSecondaryDecodedRate;
  26. // clock-drift in parts-per-million (negative or positive)
  27. int32_t clockDriftPPM;
  28. // average packet waiting time in the jitter buffer (ms)
  29. int meanWaitingTimeMs;
  30. // median packet waiting time in the jitter buffer (ms)
  31. int medianWaitingTimeMs;
  32. // min packet waiting time in the jitter buffer (ms)
  33. int minWaitingTimeMs;
  34. // max packet waiting time in the jitter buffer (ms)
  35. int maxWaitingTimeMs;
  36. // added samples in off mode due to packet loss
  37. size_t addedSamples;
  38. };

RFC2833 DTMF

备注: 支持RFC2833 配置发送。一个接口就搞定。

音视频同步

外部模块添加

需要额外添加部分

  1. kPlaybackPerChannel = 0, // channel playback
  2. kPlaybackAllChannelsMixed, // 混音 playback
  3. kRecordingPerChannel, // channel recorder
  4. kRecordingAllChannelsMixed, // 混音 record
  5. kRecordingPreprocessing // Preprocessing record

音频数据保存播放

从用文件音频数据,替代设备采集的数据发送出去,以及将RX数据保存到文件中。方便调试。

备注 : 支持回调,或保存文件等各种形式。

出错信息

  1. // Warnings
  2. #define VE_PORT_NOT_DEFINED 8001
  3. #define VE_CHANNEL_NOT_VALID 8002
  4. #define VE_FUNC_NOT_SUPPORTED 8003
  5. #define VE_INVALID_LISTNR 8004
  6. #define VE_INVALID_ARGUMENT 8005
  7. #define VE_INVALID_PORT_NMBR 8006
  8. #define VE_INVALID_PLNAME 8007
  9. #define VE_INVALID_PLFREQ 8008
  10. #define VE_INVALID_PLTYPE 8009
  11. #define VE_INVALID_PACSIZE 8010
  12. .....
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注