mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Enable Chromium to stop including api/proxy.h indirectly.
This change prepares for a later change in Chromium that makes it stop depending on headers exposed by WebRTC that require inclusion of api/proxy.h. No-Try because of lack of infra lack of capacity on macs. No-Try: True Bug: webrtc:12787 Change-Id: I628424fe49e873027595b80336be2b821c22245e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219688 Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34072}
This commit is contained in:
parent
b59e9045bf
commit
e93fe6c532
10 changed files with 170 additions and 68 deletions
|
@ -157,7 +157,9 @@ rtc_library("libjingle_peerconnection_api") {
|
||||||
"stats_types.h",
|
"stats_types.h",
|
||||||
"turn_customizer.h",
|
"turn_customizer.h",
|
||||||
"uma_metrics.h",
|
"uma_metrics.h",
|
||||||
|
"video_track_source_proxy.cc",
|
||||||
"video_track_source_proxy.h",
|
"video_track_source_proxy.h",
|
||||||
|
"video_track_source_proxy_factory.h",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":array_view",
|
":array_view",
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include "api/frame_transformer_interface.h"
|
#include "api/frame_transformer_interface.h"
|
||||||
#include "api/media_stream_interface.h"
|
#include "api/media_stream_interface.h"
|
||||||
#include "api/media_types.h"
|
#include "api/media_types.h"
|
||||||
#include "api/proxy.h"
|
|
||||||
#include "api/rtp_parameters.h"
|
#include "api/rtp_parameters.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "api/transport/rtp/rtp_source.h"
|
#include "api/transport/rtp/rtp_source.h"
|
||||||
|
@ -119,36 +118,6 @@ class RTC_EXPORT RtpReceiverInterface : public rtc::RefCountInterface {
|
||||||
~RtpReceiverInterface() override = default;
|
~RtpReceiverInterface() override = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define proxy for RtpReceiverInterface.
|
|
||||||
// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
|
|
||||||
// are called on is an implementation detail.
|
|
||||||
BEGIN_PROXY_MAP(RtpReceiver)
|
|
||||||
PROXY_PRIMARY_THREAD_DESTRUCTOR()
|
|
||||||
BYPASS_PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
|
|
||||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
|
|
||||||
PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
|
|
||||||
PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
|
|
||||||
streams)
|
|
||||||
BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
|
|
||||||
BYPASS_PROXY_CONSTMETHOD0(std::string, id)
|
|
||||||
PROXY_SECONDARY_CONSTMETHOD0(RtpParameters, GetParameters)
|
|
||||||
PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*)
|
|
||||||
PROXY_SECONDARY_METHOD1(void,
|
|
||||||
SetJitterBufferMinimumDelay,
|
|
||||||
absl::optional<double>)
|
|
||||||
PROXY_SECONDARY_CONSTMETHOD0(std::vector<RtpSource>, GetSources)
|
|
||||||
// TODO(bugs.webrtc.org/12772): Remove.
|
|
||||||
PROXY_SECONDARY_METHOD1(void,
|
|
||||||
SetFrameDecryptor,
|
|
||||||
rtc::scoped_refptr<FrameDecryptorInterface>)
|
|
||||||
// TODO(bugs.webrtc.org/12772): Remove.
|
|
||||||
PROXY_SECONDARY_CONSTMETHOD0(rtc::scoped_refptr<FrameDecryptorInterface>,
|
|
||||||
GetFrameDecryptor)
|
|
||||||
PROXY_SECONDARY_METHOD1(void,
|
|
||||||
SetDepacketizerToDecoderFrameTransformer,
|
|
||||||
rtc::scoped_refptr<FrameTransformerInterface>)
|
|
||||||
END_PROXY_MAP()
|
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
#endif // API_RTP_RECEIVER_INTERFACE_H_
|
#endif // API_RTP_RECEIVER_INTERFACE_H_
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "api/frame_transformer_interface.h"
|
#include "api/frame_transformer_interface.h"
|
||||||
#include "api/media_stream_interface.h"
|
#include "api/media_stream_interface.h"
|
||||||
#include "api/media_types.h"
|
#include "api/media_types.h"
|
||||||
#include "api/proxy.h"
|
|
||||||
#include "api/rtc_error.h"
|
#include "api/rtc_error.h"
|
||||||
#include "api/rtp_parameters.h"
|
#include "api/rtp_parameters.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
|
@ -101,33 +100,6 @@ class RTC_EXPORT RtpSenderInterface : public rtc::RefCountInterface {
|
||||||
~RtpSenderInterface() override = default;
|
~RtpSenderInterface() override = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define proxy for RtpSenderInterface.
|
|
||||||
// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
|
|
||||||
// are called on is an implementation detail.
|
|
||||||
BEGIN_PRIMARY_PROXY_MAP(RtpSender)
|
|
||||||
PROXY_PRIMARY_THREAD_DESTRUCTOR()
|
|
||||||
PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*)
|
|
||||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
|
|
||||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
|
|
||||||
PROXY_CONSTMETHOD0(uint32_t, ssrc)
|
|
||||||
BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
|
|
||||||
BYPASS_PROXY_CONSTMETHOD0(std::string, id)
|
|
||||||
PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
|
|
||||||
PROXY_CONSTMETHOD0(std::vector<RtpEncodingParameters>, init_send_encodings)
|
|
||||||
PROXY_CONSTMETHOD0(RtpParameters, GetParameters)
|
|
||||||
PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&)
|
|
||||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender)
|
|
||||||
PROXY_METHOD1(void,
|
|
||||||
SetFrameEncryptor,
|
|
||||||
rtc::scoped_refptr<FrameEncryptorInterface>)
|
|
||||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<FrameEncryptorInterface>,
|
|
||||||
GetFrameEncryptor)
|
|
||||||
PROXY_METHOD1(void, SetStreams, const std::vector<std::string>&)
|
|
||||||
PROXY_METHOD1(void,
|
|
||||||
SetEncoderToPacketizerFrameTransformer,
|
|
||||||
rtc::scoped_refptr<FrameTransformerInterface>)
|
|
||||||
END_PROXY_MAP()
|
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
#endif // API_RTP_SENDER_INTERFACE_H_
|
#endif // API_RTP_SENDER_INTERFACE_H_
|
||||||
|
|
25
api/video_track_source_proxy.cc
Normal file
25
api/video_track_source_proxy.cc
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2021 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "api/video_track_source_proxy.h"
|
||||||
|
|
||||||
|
#include "api/media_stream_interface.h"
|
||||||
|
#include "api/video_track_source_proxy_factory.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoTrackSourceProxy(
|
||||||
|
rtc::Thread* signaling_thread,
|
||||||
|
rtc::Thread* worker_thread,
|
||||||
|
VideoTrackSourceInterface* source) {
|
||||||
|
return VideoTrackSourceProxy::Create(signaling_thread, worker_thread, source);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace webrtc
|
28
api/video_track_source_proxy_factory.h
Normal file
28
api/video_track_source_proxy_factory.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2021 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_
|
||||||
|
#define API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_
|
||||||
|
|
||||||
|
#include "api/media_stream_interface.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
// Creates a proxy source for |source| which makes sure the real
|
||||||
|
// VideoTrackSourceInterface implementation is destroyed on the signaling thread
|
||||||
|
// and marshals calls to |worker_thread| and |signaling_thread|.
|
||||||
|
rtc::scoped_refptr<VideoTrackSourceInterface> RTC_EXPORT
|
||||||
|
CreateVideoTrackSourceProxy(rtc::Thread* signaling_thread,
|
||||||
|
rtc::Thread* worker_thread,
|
||||||
|
VideoTrackSourceInterface* source);
|
||||||
|
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_
|
|
@ -50,6 +50,8 @@ rtc_library("rtc_pc_base") {
|
||||||
"rtcp_mux_filter.h",
|
"rtcp_mux_filter.h",
|
||||||
"rtp_media_utils.cc",
|
"rtp_media_utils.cc",
|
||||||
"rtp_media_utils.h",
|
"rtp_media_utils.h",
|
||||||
|
"rtp_receiver_proxy.h",
|
||||||
|
"rtp_sender_proxy.h",
|
||||||
"rtp_transport.cc",
|
"rtp_transport.cc",
|
||||||
"rtp_transport.h",
|
"rtp_transport.h",
|
||||||
"rtp_transport_internal.h",
|
"rtp_transport_internal.h",
|
||||||
|
|
54
pc/rtp_receiver_proxy.h
Normal file
54
pc/rtp_receiver_proxy.h
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2021 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PC_RTP_RECEIVER_PROXY_H_
|
||||||
|
#define PC_RTP_RECEIVER_PROXY_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/proxy.h"
|
||||||
|
#include "api/rtp_receiver_interface.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
// Define proxy for RtpReceiverInterface.
|
||||||
|
// TODO(deadbeef): Move this to .cc file. What threads methods are called on is
|
||||||
|
// an implementation detail.
|
||||||
|
BEGIN_PROXY_MAP(RtpReceiver)
|
||||||
|
PROXY_PRIMARY_THREAD_DESTRUCTOR()
|
||||||
|
BYPASS_PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
|
||||||
|
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
|
||||||
|
PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
|
||||||
|
PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
|
||||||
|
streams)
|
||||||
|
BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
|
||||||
|
BYPASS_PROXY_CONSTMETHOD0(std::string, id)
|
||||||
|
PROXY_SECONDARY_CONSTMETHOD0(RtpParameters, GetParameters)
|
||||||
|
PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*)
|
||||||
|
PROXY_SECONDARY_METHOD1(void,
|
||||||
|
SetJitterBufferMinimumDelay,
|
||||||
|
absl::optional<double>)
|
||||||
|
PROXY_SECONDARY_CONSTMETHOD0(std::vector<RtpSource>, GetSources)
|
||||||
|
// TODO(bugs.webrtc.org/12772): Remove.
|
||||||
|
PROXY_SECONDARY_METHOD1(void,
|
||||||
|
SetFrameDecryptor,
|
||||||
|
rtc::scoped_refptr<FrameDecryptorInterface>)
|
||||||
|
// TODO(bugs.webrtc.org/12772): Remove.
|
||||||
|
PROXY_SECONDARY_CONSTMETHOD0(rtc::scoped_refptr<FrameDecryptorInterface>,
|
||||||
|
GetFrameDecryptor)
|
||||||
|
PROXY_SECONDARY_METHOD1(void,
|
||||||
|
SetDepacketizerToDecoderFrameTransformer,
|
||||||
|
rtc::scoped_refptr<FrameTransformerInterface>)
|
||||||
|
END_PROXY_MAP()
|
||||||
|
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // PC_RTP_RECEIVER_PROXY_H_
|
51
pc/rtp_sender_proxy.h
Normal file
51
pc/rtp_sender_proxy.h
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2021 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PC_RTP_SENDER_PROXY_H_
|
||||||
|
#define PC_RTP_SENDER_PROXY_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/proxy.h"
|
||||||
|
#include "api/rtp_sender_interface.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
// Define proxy for RtpSenderInterface.
|
||||||
|
// TODO(deadbeef): Move this to .cc file. What threads methods are called on is
|
||||||
|
// an implementation detail.
|
||||||
|
BEGIN_PRIMARY_PROXY_MAP(RtpSender)
|
||||||
|
PROXY_PRIMARY_THREAD_DESTRUCTOR()
|
||||||
|
PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*)
|
||||||
|
PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
|
||||||
|
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
|
||||||
|
PROXY_CONSTMETHOD0(uint32_t, ssrc)
|
||||||
|
BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
|
||||||
|
BYPASS_PROXY_CONSTMETHOD0(std::string, id)
|
||||||
|
PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
|
||||||
|
PROXY_CONSTMETHOD0(std::vector<RtpEncodingParameters>, init_send_encodings)
|
||||||
|
PROXY_CONSTMETHOD0(RtpParameters, GetParameters)
|
||||||
|
PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&)
|
||||||
|
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender)
|
||||||
|
PROXY_METHOD1(void,
|
||||||
|
SetFrameEncryptor,
|
||||||
|
rtc::scoped_refptr<FrameEncryptorInterface>)
|
||||||
|
PROXY_CONSTMETHOD0(rtc::scoped_refptr<FrameEncryptorInterface>,
|
||||||
|
GetFrameEncryptor)
|
||||||
|
PROXY_METHOD1(void, SetStreams, const std::vector<std::string>&)
|
||||||
|
PROXY_METHOD1(void,
|
||||||
|
SetEncoderToPacketizerFrameTransformer,
|
||||||
|
rtc::scoped_refptr<FrameTransformerInterface>)
|
||||||
|
END_PROXY_MAP()
|
||||||
|
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // PC_RTP_SENDER_PROXY_H_
|
|
@ -24,8 +24,6 @@
|
||||||
#include "api/proxy.h"
|
#include "api/proxy.h"
|
||||||
#include "api/rtc_error.h"
|
#include "api/rtc_error.h"
|
||||||
#include "api/rtp_parameters.h"
|
#include "api/rtp_parameters.h"
|
||||||
#include "api/rtp_receiver_interface.h"
|
|
||||||
#include "api/rtp_sender_interface.h"
|
|
||||||
#include "api/rtp_transceiver_direction.h"
|
#include "api/rtp_transceiver_direction.h"
|
||||||
#include "api/rtp_transceiver_interface.h"
|
#include "api/rtp_transceiver_interface.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
|
@ -33,7 +31,9 @@
|
||||||
#include "pc/channel_interface.h"
|
#include "pc/channel_interface.h"
|
||||||
#include "pc/channel_manager.h"
|
#include "pc/channel_manager.h"
|
||||||
#include "pc/rtp_receiver.h"
|
#include "pc/rtp_receiver.h"
|
||||||
|
#include "pc/rtp_receiver_proxy.h"
|
||||||
#include "pc/rtp_sender.h"
|
#include "pc/rtp_sender.h"
|
||||||
|
#include "pc/rtp_sender_proxy.h"
|
||||||
#include "rtc_base/ref_counted_object.h"
|
#include "rtc_base/ref_counted_object.h"
|
||||||
#include "rtc_base/task_utils/pending_task_safety_flag.h"
|
#include "rtc_base/task_utils/pending_task_safety_flag.h"
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "api/video/recordable_encoded_frame.h"
|
#include "api/video/recordable_encoded_frame.h"
|
||||||
#include "api/video_track_source_proxy.h"
|
#include "api/video_track_source_proxy_factory.h"
|
||||||
#include "pc/video_track.h"
|
#include "pc/video_track.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/location.h"
|
#include "rtc_base/location.h"
|
||||||
|
@ -41,9 +41,8 @@ VideoRtpReceiver::VideoRtpReceiver(
|
||||||
track_(VideoTrackProxyWithInternal<VideoTrack>::Create(
|
track_(VideoTrackProxyWithInternal<VideoTrack>::Create(
|
||||||
rtc::Thread::Current(),
|
rtc::Thread::Current(),
|
||||||
worker_thread,
|
worker_thread,
|
||||||
VideoTrack::Create(
|
VideoTrack::Create(receiver_id,
|
||||||
receiver_id,
|
CreateVideoTrackSourceProxy(rtc::Thread::Current(),
|
||||||
VideoTrackSourceProxy::Create(rtc::Thread::Current(),
|
|
||||||
worker_thread,
|
worker_thread,
|
||||||
source_),
|
source_),
|
||||||
worker_thread))),
|
worker_thread))),
|
||||||
|
|
Loading…
Reference in a new issue