WebRTC series--detailed explanation of track's set_enabled


In a recent project, it was discovered that after the set_enabled of the remote video call track is set to false, the video screen is black; through breakpoint analysis, it is found that there are still video frames in the gl part and are rendering; this article starts with the set_enabled interface and provides a detailed
analysis The calling process; this article will analyze the calling process of this interface in detail; the following code analysis is based on M76

1. Overview

MediaStreamTrackInterfaceTwo methods are defined in the WebRTC interface:

 //禁用的轨道将产生静音(如果是音频)或黑色帧(如果是视频)。可以禁用并重新启用。
  virtual bool enabled() const = <

Guess you like

Origin blog.csdn.net/lym594887256/article/details/132812095