Revert "Revert "Enables PeerConnectionFactory using external fec controller""
This reverts commit 00733015fafbbc61ddc12dfdc88b21a9fcd9d122. Reason for revert: The reason for a downstream test failure on the original commit and a workaround has been found. Solution is to keep a PeerConnectionFactory constructor implementation as the same as before. Original change's description: > Revert "Enables PeerConnectionFactory using external fec controller" > > This reverts commit 4f07bdb25567d8ef528311e0b50a62c61d543fc3. > > Reason for revert: Speculatively reverting, because downstream test is now hitting "PeerConnectionFactory.initialize was not called before creating a PeerConnectionFactory" error, even though it did call initialize. I don't see how any change in this CL could cause that, but it's the only CL on the blamelist, and it does modify PeerConnectionFactory.java > > Original change's description: > > Enables PeerConnectionFactory using external fec controller > > > > Bug: webrtc:8799 > > Change-Id: Ieb2cf6163b9a83844ab9ed4822b4a7f1db4c24b8 > > Reviewed-on: https://webrtc-review.googlesource.com/43961 > > Commit-Queue: Ying Wang <yinwa@webrtc.org> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Reviewed-by: Niels Moller <nisse@webrtc.org> > > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#22038} > > TBR=sakal@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,yinwa@webrtc.org > > Change-Id: I95868c35d6f9973e0ebf563814cd71d0fcbd433d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:8799 > Reviewed-on: https://webrtc-review.googlesource.com/54080 > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22040} TBR=deadbeef@webrtc.org,sakal@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,yinwa@webrtc.org Bug: webrtc:8799 Change-Id: If9f3292bfcc739782967530c49f006d0abbc38a8 Reviewed-on: https://webrtc-review.googlesource.com/55400 Commit-Queue: Ying Wang <yinwa@webrtc.org> Reviewed-by: Ying Wang <yinwa@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22100}
This commit is contained in:
@ -101,6 +101,7 @@ rtc_static_library("libjingle_peerconnection_api") {
|
||||
":array_view",
|
||||
":audio_options_api",
|
||||
":callfactory_api",
|
||||
":fec_controller_api",
|
||||
":libjingle_logging_api",
|
||||
":optional",
|
||||
":rtc_stats_api",
|
||||
@ -211,8 +212,8 @@ rtc_source_set("fec_controller_api") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../common_video:common_video",
|
||||
"../modules:module_api",
|
||||
"..:webrtc_common",
|
||||
"../modules:module_fec_api",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -11,10 +11,11 @@
|
||||
#ifndef API_FEC_CONTROLLER_H_
|
||||
#define API_FEC_CONTROLLER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "common_video/include/video_frame.h"
|
||||
#include "modules/include/module_common_types.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/include/module_fec_types.h"
|
||||
|
||||
namespace webrtc {
|
||||
// TODO(yinwa): work in progress. API in class FecController should not be
|
||||
@ -73,11 +74,18 @@ class FecController {
|
||||
int64_t round_trip_time_ms) = 0;
|
||||
|
||||
// Informs of encoded output.
|
||||
virtual void UpdateWithEncodedData(const EncodedImage& encoded_image) = 0;
|
||||
virtual void UpdateWithEncodedData(size_t encoded_image_length,
|
||||
FrameType encoded_image_frametype) = 0;
|
||||
|
||||
// Returns whether this FEC Controller needs Loss Vector Mask as input.
|
||||
virtual bool UseLossVectorMask() = 0;
|
||||
};
|
||||
|
||||
class FecControllerFactoryInterface {
|
||||
public:
|
||||
virtual std::unique_ptr<FecController> CreateFecController() = 0;
|
||||
virtual ~FecControllerFactoryInterface() = default;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
#endif // API_FEC_CONTROLLER_H_
|
||||
|
||||
@ -83,6 +83,7 @@
|
||||
#include "api/call/callfactoryinterface.h"
|
||||
#include "api/datachannelinterface.h"
|
||||
#include "api/dtmfsenderinterface.h"
|
||||
#include "api/fec_controller.h"
|
||||
#include "api/jsep.h"
|
||||
#include "api/mediastreaminterface.h"
|
||||
#include "api/rtcerror.h"
|
||||
@ -1296,6 +1297,27 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
|
||||
rtc::scoped_refptr<AudioMixer> audio_mixer,
|
||||
rtc::scoped_refptr<AudioProcessing> audio_processing);
|
||||
|
||||
// Create a new instance of PeerConnectionFactoryInterface with optional
|
||||
// external audio mixer, audio processing, and fec controller modules.
|
||||
//
|
||||
// If |audio_mixer| is null, an internal audio mixer will be created and used.
|
||||
// If |audio_processing| is null, an internal audio processing module will be
|
||||
// created and used.
|
||||
// If |fec_controller_factory| is null, an internal fec controller module will
|
||||
// be created and used.
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
|
||||
rtc::Thread* network_thread,
|
||||
rtc::Thread* worker_thread,
|
||||
rtc::Thread* signaling_thread,
|
||||
AudioDeviceModule* default_adm,
|
||||
rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
|
||||
rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
|
||||
cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
|
||||
cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
|
||||
rtc::scoped_refptr<AudioMixer> audio_mixer,
|
||||
rtc::scoped_refptr<AudioProcessing> audio_processing,
|
||||
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory);
|
||||
|
||||
// Create a new instance of PeerConnectionFactoryInterface with optional video
|
||||
// codec factories. These video factories represents all video codecs, i.e. no
|
||||
// extra internal video codecs will be added.
|
||||
@ -1385,6 +1407,16 @@ CreateModularPeerConnectionFactory(
|
||||
std::unique_ptr<CallFactoryInterface> call_factory,
|
||||
std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory);
|
||||
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface>
|
||||
CreateModularPeerConnectionFactory(
|
||||
rtc::Thread* network_thread,
|
||||
rtc::Thread* worker_thread,
|
||||
rtc::Thread* signaling_thread,
|
||||
std::unique_ptr<cricket::MediaEngineInterface> media_engine,
|
||||
std::unique_ptr<CallFactoryInterface> call_factory,
|
||||
std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory,
|
||||
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory);
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_PEERCONNECTIONINTERFACE_H_
|
||||
|
||||
Reference in New Issue
Block a user