[GB28181] PJSIP library (5) using audio: capture, play, transmit, receive, record, etc.

【Catalogue】Guo Lao Er's Blog Post: Summary of Images and Videos

1 Introduction

The media objects of PJSUA2 are all derived fromabstract base classpj::Media, a media object refers to an object that can generate or read media.
The class pj::AudioMedia is derived from pj::Media and represents audio media.
PJSUA2 supports several types of audio media objects:

从声音设备中捕获音频的AudioMedia;
向声音设备播放音频的AudioMedia;
向远程人员传输音频或从远程人员接收音频的AudioMedia;
播放 WAV 文件的pj::AudioMediaPlayer;
将音频录制到 WAV 文件中的pj::AudioMediaRecorder;

2. Conference Bridge

The conference bridge is a concept created to manage audio streams between audio media.
The principle is simple; the app connects the audio source to the audio destination, the bridge lets the audio flow from that source to the specified destination, and that's it. If multiple sources are streaming to the same destination, the audio from these sources will be mixed. If a source is transmitted to multiple destinations, the bridge is responsible for duplicating the audio from the source to multiple destinations. The bridge even handles mixed media with different clock rates and ptimes (the duration of each packet of audio data).

In PJSUA2, all audio media objects are registered to a central conference bridge for easy manipulation. Audio media registered to the central conference bridge is not connected to anything, so the media does not flow out/to anything. The audio media source can use pj::AudioMedia::st

Guess you like

Origin blog.csdn.net/u010168781/article/details/130074184
Recommended