[GB28181] PJSIP library (6) Use video: get image, local preview, send and receive video, etc.

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

1 Introduction

The media objects of PJSUA2 are all derived from the abstract base class pj::Media, and the media objects refer to the objects that can generate or read media.
The class pj::VideoMedia is derived from pj::Media and represents video media.

PJSUA2 supports several types of video media objects:

从相机捕获视频帧的VideoMedia;
在屏幕上渲染视频帧的VideoMedia;
向/从远程方发送和接收视频的VideoMedia。

2. Video conferencing bridge

A video conferencing bridge works on the same principle as an audio conferencing bridge: an application connects a video source to a video destination to allow video to stream from that source to the specified destination. If multiple sources are streaming to the same destination, the video frames from the sources are combined into a single video frame in a specific tile configuration. If a source is being transmitted to multiple destinations, the bridge will be responsible for copying the video frames from the source to the multiple destinations. The bridge will even take care of mixing videos with different frame rates.

In PJSUA2, all types of video media objects pj::VideoMedia are registered to the central conference bridge for easy operation. First, the registered video media is not connected to anything, so the media does not flow out/to anything.

Video media sources can use pj::VideoMedia::startTransmit() and pj::VideoMedia::stopTransmit() to start and stop the transmission of the video stream.

Audio media objects registered to a conference bridge are given a port ID number that identifies the object in the bridge. Applications can use pj::AudioMedia::getPortId() to retrieve the port ID. Unless the application wants to create custom video media,

Guess you like

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