Add missing ifdefs to header files for SW video codecs.

Some functions were removed from the implementation files when this
flag is unset, but remained in the header files.

Bug: webrtc:7925
Change-Id: I9f8f969fb52f83c05ba02500a62dee78d1bcb0dc
Reviewed-on: https://webrtc-review.googlesource.com/80260
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24366}
This commit is contained in:
Anders Carlsson
2018-08-09 15:01:10 -07:00
committed by Commit Bot
parent 7d13a6e5b9
commit 50635036db
2 changed files with 6 additions and 0 deletions

View File

@ -1327,6 +1327,7 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
~PeerConnectionFactoryInterface() override = default; ~PeerConnectionFactoryInterface() override = default;
}; };
#if defined(USE_BUILTIN_SW_CODECS)
// Create a new instance of PeerConnectionFactoryInterface. // Create a new instance of PeerConnectionFactoryInterface.
// //
// This method relies on the thread it's called on as the "signaling thread" // This method relies on the thread it's called on as the "signaling thread"
@ -1403,6 +1404,7 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory, std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory,
std::unique_ptr<NetworkControllerFactoryInterface> std::unique_ptr<NetworkControllerFactoryInterface>
network_controller_factory = nullptr); network_controller_factory = nullptr);
#endif
// Create a new instance of PeerConnectionFactoryInterface with optional video // Create a new instance of PeerConnectionFactoryInterface with optional video
// codec factories. These video factories represents all video codecs, i.e. no // codec factories. These video factories represents all video codecs, i.e. no
@ -1421,6 +1423,7 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
rtc::scoped_refptr<AudioMixer> audio_mixer, rtc::scoped_refptr<AudioMixer> audio_mixer,
rtc::scoped_refptr<AudioProcessing> audio_processing); rtc::scoped_refptr<AudioProcessing> audio_processing);
#if defined(USE_BUILTIN_SW_CODECS)
// Create a new instance of PeerConnectionFactoryInterface with external audio // Create a new instance of PeerConnectionFactoryInterface with external audio
// mixer. // mixer.
// //
@ -1453,6 +1456,7 @@ CreatePeerConnectionFactory(
default_adm, audio_encoder_factory, audio_decoder_factory, default_adm, audio_encoder_factory, audio_decoder_factory,
video_encoder_factory, video_decoder_factory); video_encoder_factory, video_decoder_factory);
} }
#endif
// This is a lower-level version of the CreatePeerConnectionFactory functions // This is a lower-level version of the CreatePeerConnectionFactory functions
// above. It's implemented in the "peerconnection" build target, whereas the // above. It's implemented in the "peerconnection" build target, whereas the

View File

@ -41,6 +41,7 @@ class WebRtcMediaEngineFactory {
// //
// TODO(deadbeef): Change these to return an std::unique_ptr<>, to indicate // TODO(deadbeef): Change these to return an std::unique_ptr<>, to indicate
// that the caller owns the returned object. // that the caller owns the returned object.
#if defined(USE_BUILTIN_SW_CODECS)
static MediaEngineInterface* Create( static MediaEngineInterface* Create(
webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm,
const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& const rtc::scoped_refptr<webrtc::AudioEncoderFactory>&
@ -59,6 +60,7 @@ class WebRtcMediaEngineFactory {
WebRtcVideoDecoderFactory* video_decoder_factory, WebRtcVideoDecoderFactory* video_decoder_factory,
rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer,
rtc::scoped_refptr<webrtc::AudioProcessing> apm); rtc::scoped_refptr<webrtc::AudioProcessing> apm);
#endif
// Create a MediaEngineInterface with optional video codec factories. These // Create a MediaEngineInterface with optional video codec factories. These
// video factories represents all video codecs, i.e. no extra internal video // video factories represents all video codecs, i.e. no extra internal video