Revert "Use the factory instead of using the builtin code path in VideoCodecInitializer."

This reverts commit be142178aaf6ab4089b4d81c88c3d59c12cca567.

Reason for revert: breaking internal projects

Original change's description:
> Use the factory instead of using the builtin code path in `VideoCodecInitializer`.
> 
> Bug: webrtc:9513
> Change-Id: Ia299ae1044a3ff4c91e208200938cba540bdcea6
> Reviewed-on: https://webrtc-review.googlesource.com/c/94782
> Commit-Queue: Jiawei Ou <ouj@fb.com>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25456}

TBR=brandtr@webrtc.org,magjed@webrtc.org,sakal@webrtc.org,nisse@webrtc.org,andersc@webrtc.org,tommi@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,srte@webrtc.org,perkj@webrtc.org,tkchin@webrtc.org,shampson@webrtc.org,glaznev@webrtc.org,ouj@fb.com,qingsi@webrtc.org

Change-Id: I8040ccabe3ae6464d72c7696adb663c1dd275b63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9513
Reviewed-on: https://webrtc-review.googlesource.com/c/108980
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25459}
This commit is contained in:
Qingsi Wang
2018-11-01 04:45:53 +00:00
committed by Commit Bot
parent 7852d291c9
commit 59844ce57e
57 changed files with 137 additions and 389 deletions

View File

@ -573,7 +573,6 @@ if (is_android) {
":vp9_jni", # TODO(bugs.webrtc.org/7925): Remove.
"../..:webrtc_common",
"../../api:libjingle_peerconnection_api",
"../../api/video:builtin_video_bitrate_allocator_factory",
"../../api/video:encoded_image",
"../../api/video:video_frame",
"../../api/video_codecs:builtin_video_decoder_factory",
@ -663,7 +662,6 @@ if (is_android) {
":native_api_jni",
"../..:webrtc_common",
"../../api:libjingle_peerconnection_api",
"../../api/video:video_bitrate_allocator_factory",
"../../api/video_codecs:video_codecs_api",
"../../logging:rtc_event_log_api",
"../../logging:rtc_event_log_impl_base",
@ -876,7 +874,6 @@ if (is_android) {
deps = [
":base_jni",
"../../api/video:video_bitrate_allocator_factory",
"../../api/video_codecs:video_codecs_api",
]
}
@ -899,7 +896,6 @@ if (is_android) {
deps = [
":base_jni",
"../../api:callfactory_api",
"../../api/video:video_bitrate_allocator_factory",
"../../api/video_codecs:video_codecs_api",
"../../call:call_interfaces",
"../../logging:rtc_event_log_api",
@ -1392,7 +1388,6 @@ if (is_android) {
":video_jni",
"../../api/audio_codecs:builtin_audio_decoder_factory",
"../../api/audio_codecs:builtin_audio_encoder_factory",
"../../api/video:builtin_video_bitrate_allocator_factory",
"../../api/video:video_frame",
"../../media:rtc_audio_video",
"../../media:rtc_internal_video_codecs",

View File

@ -12,7 +12,6 @@
#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "media/base/mediaengine.h"
#include "media/engine/internaldecoderfactory.h"
#include "media/engine/internalencoderfactory.h"
@ -45,7 +44,6 @@ rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> CreateTestPCF(
webrtc::CreateBuiltinAudioDecoderFactory(),
absl::make_unique<webrtc::InternalEncoderFactory>(),
absl::make_unique<webrtc::InternalDecoderFactory>(),
webrtc::CreateBuiltinVideoBitrateAllocatorFactory(),
nullptr /* audio_mixer */, webrtc::AudioProcessingBuilder().Create());
RTC_LOG(LS_INFO) << "Media engine created: " << media_engine.get();

View File

@ -12,7 +12,6 @@
#include <utility>
#include "api/call/callfactoryinterface.h"
#include "api/video/video_bitrate_allocator_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "logging/rtc_event_log/rtc_event_log_factory_interface.h"
@ -37,15 +36,12 @@ cricket::MediaEngineInterface* CreateMediaEngine(
rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
std::unique_ptr<VideoEncoderFactory> video_encoder_factory,
std::unique_ptr<VideoDecoderFactory> video_decoder_factory,
std::unique_ptr<VideoBitrateAllocatorFactory>
video_bitrate_allocator_factory,
rtc::scoped_refptr<AudioMixer> audio_mixer,
rtc::scoped_refptr<AudioProcessing> audio_processor) {
return cricket::WebRtcMediaEngineFactory::Create(
adm, audio_encoder_factory, audio_decoder_factory,
std::move(video_encoder_factory), std::move(video_decoder_factory),
std::move(video_bitrate_allocator_factory), audio_mixer,
audio_processor)
audio_mixer, audio_processor)
.release();
}

View File

@ -25,7 +25,6 @@ class AudioMixer;
class AudioProcessing;
class VideoEncoderFactory;
class VideoDecoderFactory;
class VideoBitrateAllocatorFactory;
} // namespace webrtc
namespace cricket {
@ -44,8 +43,6 @@ cricket::MediaEngineInterface* CreateMediaEngine(
rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
std::unique_ptr<VideoEncoderFactory> video_encoder_factory,
std::unique_ptr<VideoDecoderFactory> video_decoder_factory,
std::unique_ptr<VideoBitrateAllocatorFactory>
video_bitrate_allocator_factory,
rtc::scoped_refptr<AudioMixer> audio_mixer,
rtc::scoped_refptr<AudioProcessing> audio_processor);

View File

@ -27,8 +27,6 @@ cricket::MediaEngineInterface* CreateMediaEngine(
rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
std::unique_ptr<VideoEncoderFactory> video_encoder_factory,
std::unique_ptr<VideoDecoderFactory> video_decoder_factory,
std::unique_ptr<VideoBitrateAllocatorFactory>
video_bitrate_allocator_factory,
rtc::scoped_refptr<AudioMixer> audio_mixer,
rtc::scoped_refptr<AudioProcessing> audio_processor) {
return nullptr;

View File

@ -10,7 +10,6 @@
#include "sdk/android/src/jni/pc/video.h"
#include "api/video/video_bitrate_allocator_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
@ -36,10 +35,5 @@ void* CreateVideoSource(JNIEnv* env,
return nullptr;
}
std::unique_ptr<VideoBitrateAllocatorFactory>
CreateVideoBitrateAllocatorFactory() {
return nullptr;
}
} // namespace jni
} // namespace webrtc

View File

@ -13,7 +13,6 @@
#include <memory>
#include <utility>
#include "api/video/video_bitrate_allocator_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "media/base/mediaengine.h"
@ -260,17 +259,13 @@ jlong CreatePeerConnectionFactoryForJava(
std::unique_ptr<RtcEventLogFactoryInterface> rtc_event_log_factory(
CreateRtcEventLogFactory());
std::unique_ptr<VideoBitrateAllocatorFactory>
video_bitrate_allocator_factory = CreateVideoBitrateAllocatorFactory();
std::unique_ptr<cricket::MediaEngineInterface> media_engine(CreateMediaEngine(
audio_device_module, audio_encoder_factory, audio_decoder_factory,
std::unique_ptr<VideoEncoderFactory>(
CreateVideoEncoderFactory(jni, jencoder_factory)),
std::unique_ptr<VideoDecoderFactory>(
CreateVideoDecoderFactory(jni, jdecoder_factory)),
std::move(video_bitrate_allocator_factory), audio_mixer,
audio_processor));
audio_mixer, audio_processor));
PeerConnectionFactoryDependencies dependencies;
dependencies.network_thread = network_thread.get();
dependencies.worker_thread = worker_thread.get();

View File

@ -13,7 +13,6 @@
#include <jni.h>
#include <memory>
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "api/videosourceproxy.h"
@ -53,10 +52,5 @@ void* CreateVideoSource(JNIEnv* env,
.release();
}
std::unique_ptr<VideoBitrateAllocatorFactory>
CreateVideoBitrateAllocatorFactory() {
return CreateBuiltinVideoBitrateAllocatorFactory();
}
} // namespace jni
} // namespace webrtc

View File

@ -13,7 +13,6 @@
#include <jni.h>
#include <memory>
#include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/thread.h"
#include "sdk/android/native_api/jni/scoped_java_ref.h"
@ -21,7 +20,6 @@
namespace webrtc {
class VideoEncoderFactory;
class VideoDecoderFactory;
class VideoBitrateAllocatorFactory;
} // namespace webrtc
namespace webrtc {
@ -40,9 +38,6 @@ void* CreateVideoSource(JNIEnv* env,
rtc::Thread* worker_thread,
jboolean is_screencast);
std::unique_ptr<VideoBitrateAllocatorFactory>
CreateVideoBitrateAllocatorFactory();
} // namespace jni
} // namespace webrtc