Resolve circular dependency in rtc_media_base.

This one was pretty straightforward fortunately.

Bug: webrtc:6828
Change-Id: Ie7b5e71f1298c409dbca2c74eaa09c0986e41d8f
Reviewed-on: https://webrtc-review.googlesource.com/25821
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20914}
This commit is contained in:
Patrik Höglund
2017-11-28 15:46:08 +01:00
committed by Commit Bot
parent b874a35227
commit aba85d1f53
8 changed files with 19 additions and 16 deletions

View File

@ -52,13 +52,6 @@ rtc_source_set("rtc_h264_profile_id") {
}
rtc_static_library("rtc_media_base") {
# TODO(kjellander): Remove (bugs.webrtc.org/6828)
# Enabling GN check triggers cyclic dependency error:
# :rtc_media_base ->
# ../pc:rtc_pc_base ->
# :rtc_data ->
# :rtc_media_base
check_includes = false
defines = []
libs = []
deps = []
@ -119,9 +112,18 @@ rtc_static_library("rtc_media_base") {
deps += [
"..:webrtc_common",
"../api:libjingle_peerconnection_api",
"../api:optional",
"../api:video_frame_api",
"../api:video_frame_api_i420",
"../api/audio_codecs:audio_codecs_api",
"../api/video_codecs:video_codecs_api",
"../call:call_interfaces",
"../call:video_stream_api",
"../modules/audio_processing:audio_processing_statistics",
"../p2p",
"../rtc_base:rtc_base",
"../rtc_base:rtc_base_approved",
"../system_wrappers:field_trial_api",
]
public_deps += [ ":rtc_h264_profile_id" ]

View File

@ -382,7 +382,7 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
return true;
}
virtual bool GetActiveStreams(AudioInfo::StreamList* streams) { return true; }
virtual bool GetActiveStreams(StreamList* streams) { return true; }
virtual int GetOutputLevel() { return 0; }
virtual bool CanInsertDtmf() {

View File

@ -14,6 +14,7 @@
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "api/audio_codecs/audio_encoder.h"
@ -28,6 +29,7 @@
#include "media/base/videosinkinterface.h"
#include "media/base/videosourceinterface.h"
#include "modules/audio_processing/include/audio_processing_statistics.h"
#include "rtc_base/asyncpacketsocket.h"
#include "rtc_base/basictypes.h"
#include "rtc_base/buffer.h"
#include "rtc_base/copyonwritebuffer.h"
@ -37,8 +39,7 @@
#include "rtc_base/sigslot.h"
#include "rtc_base/socket.h"
#include "rtc_base/window.h"
// TODO(juberti): re-evaluate this include
#include "pc/audiomonitor.h"
namespace rtc {
class RateLimiter;
@ -1020,7 +1021,8 @@ class VoiceMediaChannel : public MediaChannel {
const AudioOptions* options,
AudioSource* source) = 0;
// Gets current energy levels for all incoming streams.
virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0;
typedef std::vector<std::pair<uint32_t, int>> StreamList;
virtual bool GetActiveStreams(StreamList* actives) = 0;
// Get the current energy level of the stream sent to the speaker.
virtual int GetOutputLevel() = 0;
// Set speaker output volume of the specified ssrc.

View File

@ -12,10 +12,6 @@
#if !defined(DISABLE_MEDIA_ENGINE_FACTORY)
#if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO)
#include "media/engine/webrtcmediaengine.h"
#endif // HAVE_WEBRTC_VOICE && HAVE_WEBRTC_VIDEO
namespace cricket {
MediaEngineFactory::MediaEngineCreateFunction

View File

@ -192,7 +192,7 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
bool RemoveSendStream(uint32_t ssrc) override;
bool AddRecvStream(const StreamParams& sp) override;
bool RemoveRecvStream(uint32_t ssrc) override;
bool GetActiveStreams(AudioInfo::StreamList* actives) override;
bool GetActiveStreams(StreamList* actives) override;
int GetOutputLevel() override;
// SSRC=0 will apply the new volume to current and future unsignaled streams.
bool SetOutputVolume(uint32_t ssrc, double volume) override;

View File

@ -14,6 +14,7 @@
#include "pc/mediasession.h"
#include "pc/webrtcsdp.h"
#include "p2p/base/port.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/stringencode.h"

View File

@ -15,6 +15,7 @@
#include "api/jsepicecandidate.h"
#include "api/jsepsessiondescription.h"
#include "api/webrtcsdp.h"
#include "p2p/base/port.h"
#include "p2p/base/p2pconstants.h"
#include "p2p/base/sessiondescription.h"
#include "pc/mediasession.h"

View File

@ -16,6 +16,7 @@
#include "api/jsepsessiondescription.h"
#include "media/base/mediaconstants.h"
#include "media/engine/webrtcvideoengine.h"
#include "p2p/base/port.h"
#include "p2p/base/p2pconstants.h"
#include "pc/mediasession.h"
#include "rtc_base/checks.h"