Support building WebRTC without audio and video.

This CL makes the WebRTC more modular and allows the users to build
WebRTC without audio and video(DataChannel only).

The BUILD files in call/, logging/, media/ and pc/ are modified to
support modular WebRTC.

The dependencies on Call and RtcEventLog are removed from the
PeerConnection. Instead of being created internally, they would be
passed in by the PeerConnectionFactory.

Add the CreateModularPeerConnectionFactory function which allow the
users to create a PeerConnectionFactory with the modules they need.
If the users want to build WebRTC without audio and video, they can
pass in null pointers for modules they don't need. (MediaEngine,
VideoEncoderFactory etc.)

BUG=webrtc:7613

Review-Url: https://codereview.webrtc.org/2854123003
Cr-Commit-Position: refs/heads/master@{#18617}
This commit is contained in:
zhihuang
2017-06-15 12:52:32 -07:00
committed by Commit Bot
parent beae92c784
commit 38ede13042
40 changed files with 830 additions and 321 deletions

View File

@ -12,6 +12,8 @@
#include <utility>
#include "webrtc/base/logging.h"
namespace {
// MediaCodec wants resolution to be divisible by 2.
const int kRequiredResolutionAlignment = 2;

View File

@ -9,6 +9,7 @@
*/
#include "webrtc/api/videosourceproxy.h"
#include "webrtc/base/logging.h"
#include "webrtc/sdk/android/src/jni/androidvideotracksource.h"
#include "webrtc/sdk/android/src/jni/classreferenceholder.h"