New target for api/rtp_parameters.h and api/media_types.h.
The new target does not depend on libjingle_peerconnection_api, and to do this, the named "audio" and "video" string literals had to be moved from media_stream_interface.cc to media_types.cc. In this cl, the dependency on libjingle_peerconnection_api can be dropped from a few targets. No-Presubmit: True Bug: webrtc:8733 Change-Id: Icc675280d5c3c537f2255a9389ff18a482049921 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/53861 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28998}
This commit is contained in:
24
api/BUILD.gn
24
api/BUILD.gn
@ -134,8 +134,6 @@ rtc_static_library("libjingle_peerconnection_api") {
|
||||
"media_transport_config.h",
|
||||
"media_transport_interface.cc",
|
||||
"media_transport_interface.h",
|
||||
"media_types.cc",
|
||||
"media_types.h",
|
||||
"notifier.h",
|
||||
"peer_connection_factory_proxy.h",
|
||||
"peer_connection_interface.cc",
|
||||
@ -145,8 +143,6 @@ rtc_static_library("libjingle_peerconnection_api") {
|
||||
"proxy.h",
|
||||
"rtc_error.cc",
|
||||
"rtc_error.h",
|
||||
"rtp_parameters.cc",
|
||||
"rtp_parameters.h",
|
||||
"rtp_receiver_interface.cc",
|
||||
"rtp_receiver_interface.h",
|
||||
"rtp_sender_interface.cc",
|
||||
@ -222,6 +218,7 @@ rtc_source_set("video_quality_test_fixture_api") {
|
||||
":fec_controller_api",
|
||||
":libjingle_peerconnection_api",
|
||||
":network_state_predictor_api",
|
||||
":rtp_parameters",
|
||||
":simulated_network_api",
|
||||
"../call:fake_network",
|
||||
"../call:rtp_interfaces",
|
||||
@ -256,10 +253,21 @@ rtc_source_set("track_id_stream_label_map") {
|
||||
]
|
||||
}
|
||||
|
||||
# TODO(bugs.webrtc.org/8733): Move media_types.* and rtp_parameters.*
|
||||
# to this target.
|
||||
rtc_source_set("rtp_parameters") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"media_types.cc",
|
||||
"media_types.h",
|
||||
"rtp_parameters.cc",
|
||||
"rtp_parameters.h",
|
||||
]
|
||||
deps = [
|
||||
":array_view",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:stringutils",
|
||||
"../rtc_base/system:rtc_export",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("audio_quality_analyzer_api") {
|
||||
@ -284,6 +292,7 @@ rtc_source_set("stats_observer_interface") {
|
||||
|
||||
deps = [
|
||||
":libjingle_peerconnection_api",
|
||||
":rtp_parameters",
|
||||
]
|
||||
}
|
||||
|
||||
@ -707,6 +716,7 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":array_view",
|
||||
":libjingle_peerconnection_api",
|
||||
":rtp_parameters",
|
||||
"..:webrtc_common",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
@ -722,6 +732,7 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":array_view",
|
||||
":libjingle_peerconnection_api",
|
||||
":rtp_parameters",
|
||||
"..:webrtc_common",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
@ -874,6 +885,7 @@ if (rtc_include_tests) {
|
||||
":loopback_media_transport",
|
||||
":rtc_event_log_output_file",
|
||||
":rtp_packet_info",
|
||||
":rtp_parameters",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:gunit_helpers",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
|
||||
@ -9,11 +9,14 @@
|
||||
*/
|
||||
|
||||
#include "api/media_stream_interface.h"
|
||||
#include "api/media_types.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
const char MediaStreamTrackInterface::kVideoKind[] = "video";
|
||||
const char MediaStreamTrackInterface::kAudioKind[] = "audio";
|
||||
const char* const MediaStreamTrackInterface::kVideoKind =
|
||||
cricket::kMediaTypeVideo;
|
||||
const char* const MediaStreamTrackInterface::kAudioKind =
|
||||
cricket::kMediaTypeAudio;
|
||||
|
||||
VideoTrackInterface::ContentHint VideoTrackInterface::content_hint() const {
|
||||
return ContentHint::kNone;
|
||||
|
||||
@ -76,8 +76,8 @@ class RTC_EXPORT MediaStreamTrackInterface : public rtc::RefCountInterface,
|
||||
kEnded,
|
||||
};
|
||||
|
||||
static const char kAudioKind[];
|
||||
static const char kVideoKind[];
|
||||
static const char* const kAudioKind;
|
||||
static const char* const kVideoKind;
|
||||
|
||||
// The kind() method must return kAudioKind only if the object is a
|
||||
// subclass of AudioTrackInterface, and kVideoKind only if the
|
||||
|
||||
@ -10,21 +10,20 @@
|
||||
|
||||
#include "api/media_types.h"
|
||||
|
||||
#include "api/media_stream_interface.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace {
|
||||
static const char* kMediaTypeData = "data";
|
||||
} // namespace
|
||||
|
||||
namespace cricket {
|
||||
|
||||
const char kMediaTypeVideo[] = "video";
|
||||
const char kMediaTypeAudio[] = "audio";
|
||||
const char kMediaTypeData[] = "data";
|
||||
|
||||
std::string MediaTypeToString(MediaType type) {
|
||||
switch (type) {
|
||||
case MEDIA_TYPE_AUDIO:
|
||||
return webrtc::MediaStreamTrackInterface::kAudioKind;
|
||||
return kMediaTypeAudio;
|
||||
case MEDIA_TYPE_VIDEO:
|
||||
return webrtc::MediaStreamTrackInterface::kVideoKind;
|
||||
return kMediaTypeVideo;
|
||||
case MEDIA_TYPE_DATA:
|
||||
return kMediaTypeData;
|
||||
}
|
||||
|
||||
@ -22,6 +22,10 @@ namespace cricket {
|
||||
|
||||
enum MediaType { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO, MEDIA_TYPE_DATA };
|
||||
|
||||
extern const char kMediaTypeAudio[];
|
||||
extern const char kMediaTypeVideo[];
|
||||
extern const char kMediaTypeData[];
|
||||
|
||||
RTC_EXPORT std::string MediaTypeToString(MediaType type);
|
||||
|
||||
} // namespace cricket
|
||||
|
||||
@ -227,6 +227,7 @@ rtc_source_set("video_stream_encoder") {
|
||||
":video_bitrate_allocator_factory",
|
||||
":video_frame",
|
||||
"../:fec_controller_api",
|
||||
"../:rtp_parameters",
|
||||
"../units:data_rate",
|
||||
|
||||
# For rtpparameters.h
|
||||
|
||||
@ -43,6 +43,7 @@ rtc_static_library("audio") {
|
||||
"../api:function_view",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:transport_api",
|
||||
"../api/audio:aec3_factory",
|
||||
|
||||
@ -34,6 +34,7 @@ rtc_source_set("call_interfaces") {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:network_state_predictor_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:transport_api",
|
||||
"../api/audio:audio_mixer_api",
|
||||
@ -76,6 +77,7 @@ rtc_source_set("rtp_interfaces") {
|
||||
"../api:fec_controller_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api/rtc_event_log",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../api/units:timestamp",
|
||||
@ -129,6 +131,7 @@ rtc_source_set("rtp_sender") {
|
||||
"../api:array_view",
|
||||
"../api:fec_controller_api",
|
||||
"../api:network_state_predictor_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:transport_api",
|
||||
"../api/rtc_event_log",
|
||||
"../api/transport:field_trial_based_config",
|
||||
@ -226,6 +229,7 @@ rtc_static_library("call") {
|
||||
"../api:fec_controller_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:simulated_network_api",
|
||||
"../api:transport_api",
|
||||
"../api/rtc_event_log",
|
||||
@ -273,6 +277,7 @@ rtc_source_set("video_stream_api") {
|
||||
":rtp_interfaces",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:transport_api",
|
||||
"../api/video:video_frame",
|
||||
"../api/video:video_rtp_headers",
|
||||
@ -324,7 +329,7 @@ rtc_source_set("fake_network") {
|
||||
":call_interfaces",
|
||||
":simulated_network",
|
||||
":simulated_packet_receiver",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:simulated_network_api",
|
||||
"../api:transport_api",
|
||||
"../modules/utility",
|
||||
@ -370,6 +375,7 @@ if (rtc_include_tests) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:mock_audio_mixer",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:transport_api",
|
||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"../api/rtc_event_log",
|
||||
|
||||
@ -34,7 +34,7 @@ rtc_source_set("rtc_event_log_api") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../api:libjingle_logging_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api/rtc_event_log",
|
||||
"../api/task_queue",
|
||||
@ -53,6 +53,7 @@ rtc_source_set("rtc_stream_config") {
|
||||
":rtc_event_log_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
]
|
||||
}
|
||||
|
||||
@ -190,8 +191,8 @@ rtc_static_library("rtc_event_log_impl_encoder") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api/transport:network_control",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
@ -318,8 +319,8 @@ if (rtc_enable_protobuf) {
|
||||
":rtc_event_log_proto",
|
||||
":rtc_stream_config",
|
||||
"../api:function_view",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api/rtc_event_log",
|
||||
"../api/units:data_rate",
|
||||
"../api/units:time_delta",
|
||||
@ -369,9 +370,9 @@ if (rtc_enable_protobuf) {
|
||||
":rtc_event_video",
|
||||
":rtc_stream_config",
|
||||
"../api:array_view",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtc_event_log_output_file",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api/rtc_event_log",
|
||||
"../api/rtc_event_log:rtc_event_log_factory",
|
||||
"../api/task_queue:default_task_queue_factory",
|
||||
|
||||
@ -75,6 +75,7 @@ rtc_static_library("rtc_media_base") {
|
||||
"../api:array_view",
|
||||
"../api:audio_options_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api/audio_codecs:audio_codecs_api",
|
||||
"../api/video:video_bitrate_allocation",
|
||||
@ -260,6 +261,7 @@ rtc_static_library("rtc_audio_video") {
|
||||
"..:webrtc_common",
|
||||
"../api:call_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:transport_api",
|
||||
"../api/audio:audio_mixer_api",
|
||||
@ -517,6 +519,7 @@ if (rtc_include_tests) {
|
||||
"../api:mock_video_bitrate_allocator_factory",
|
||||
"../api:mock_video_codec_factory",
|
||||
"../api:mock_video_encoder",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:simulcast_test_fixture_api",
|
||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
|
||||
@ -102,6 +102,7 @@ rtc_source_set("rtp_rtcp_format") {
|
||||
"../../api:function_view",
|
||||
"../../api:libjingle_peerconnection_api",
|
||||
"../../api:rtp_headers",
|
||||
"../../api:rtp_parameters",
|
||||
"../../api/audio_codecs:audio_codecs_api",
|
||||
"../../api/transport:network_control",
|
||||
"../../api/video:video_frame",
|
||||
@ -222,6 +223,7 @@ rtc_static_library("rtp_rtcp") {
|
||||
"../../api:libjingle_peerconnection_api",
|
||||
"../../api:rtp_headers",
|
||||
"../../api:rtp_packet_info",
|
||||
"../../api:rtp_parameters",
|
||||
"../../api:scoped_refptr",
|
||||
"../../api:transport_api",
|
||||
"../../api/audio_codecs:audio_codecs_api",
|
||||
@ -469,6 +471,7 @@ if (rtc_include_tests) {
|
||||
"../../api:libjingle_peerconnection_api",
|
||||
"../../api:rtp_headers",
|
||||
"../../api:rtp_packet_info",
|
||||
"../../api:rtp_parameters",
|
||||
"../../api:scoped_refptr",
|
||||
"../../api:transport_api",
|
||||
"../../api/transport:field_trial_based_config",
|
||||
|
||||
@ -83,6 +83,8 @@ rtc_static_library("rtc_pc_base") {
|
||||
"../api:call_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api/rtc_event_log",
|
||||
"../api/video:builtin_video_bitrate_allocator_factory",
|
||||
@ -92,6 +94,7 @@ rtc_static_library("rtc_pc_base") {
|
||||
"../call:rtp_interfaces",
|
||||
"../call:rtp_receiver",
|
||||
"../common_video",
|
||||
"../common_video:common_video",
|
||||
"../logging:ice_log",
|
||||
"../media:rtc_data",
|
||||
"../media:rtc_h264_profile_id",
|
||||
@ -218,6 +221,7 @@ rtc_static_library("peerconnection") {
|
||||
"../api:network_state_predictor_api",
|
||||
"../api:rtc_event_log_output_file",
|
||||
"../api:rtc_stats_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api/rtc_event_log",
|
||||
"../api/task_queue",
|
||||
@ -306,6 +310,7 @@ if (rtc_include_tests) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:loopback_media_transport",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api/video:builtin_video_bitrate_allocator_factory",
|
||||
"../call:rtp_interfaces",
|
||||
"../call:rtp_receiver",
|
||||
@ -388,6 +393,7 @@ if (rtc_include_tests) {
|
||||
"../api:function_view",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtc_stats_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../pc:peerconnection",
|
||||
"../rtc_base:checks",
|
||||
@ -567,6 +573,7 @@ if (rtc_include_tests) {
|
||||
"../api:fake_media_transport",
|
||||
"../api:rtc_event_log_output_file",
|
||||
"../api:rtc_stats_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api/audio_codecs:audio_codecs_api",
|
||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"../api/audio_codecs:builtin_audio_encoder_factory",
|
||||
|
||||
@ -153,7 +153,7 @@ if (!build_with_chromium) {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:transport_api",
|
||||
"../api/rtc_event_log",
|
||||
"../api/task_queue:default_task_queue_factory",
|
||||
|
||||
@ -922,6 +922,7 @@ if (is_ios || is_mac) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtc_event_log_output_file",
|
||||
"../api:rtc_stats_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api/audio_codecs:audio_codecs_api",
|
||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
|
||||
@ -760,6 +760,7 @@ if (current_os == "linux" || is_android) {
|
||||
"../../api:callfactory_api",
|
||||
"../../api:libjingle_peerconnection_api",
|
||||
"../../api:rtc_event_log_output_file",
|
||||
"../../api:rtp_parameters",
|
||||
"../../api/rtc_event_log:rtc_event_log_factory",
|
||||
"../../api/task_queue:default_task_queue_factory",
|
||||
"../../api/video_codecs:video_codecs_api",
|
||||
|
||||
@ -737,6 +737,7 @@ rtc_source_set("test_common") {
|
||||
":video_test_common",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:simulated_network_api",
|
||||
"../api:transport_api",
|
||||
|
||||
@ -502,6 +502,7 @@ rtc_source_set("sdp_changer") {
|
||||
deps = [
|
||||
"../../../api:array_view",
|
||||
"../../../api:libjingle_peerconnection_api",
|
||||
"../../../api:rtp_parameters",
|
||||
"../../../media:rtc_media_base",
|
||||
"../../../p2p:rtc_p2p",
|
||||
"../../../pc:peerconnection",
|
||||
|
||||
@ -82,6 +82,7 @@ if (rtc_include_tests) {
|
||||
"../../api:fec_controller_api",
|
||||
"../../api:libjingle_peerconnection_api",
|
||||
"../../api:rtc_event_log_output_file",
|
||||
"../../api:rtp_parameters",
|
||||
"../../api:transport_api",
|
||||
"../../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"../../api/audio_codecs:builtin_audio_encoder_factory",
|
||||
|
||||
@ -55,6 +55,7 @@ rtc_static_library("video") {
|
||||
"../api:array_view",
|
||||
"../api:fec_controller_api",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:transport_api",
|
||||
"../api/rtc_event_log",
|
||||
@ -565,6 +566,7 @@ if (rtc_include_tests) {
|
||||
"../api:mock_fec_controller_override",
|
||||
"../api:mock_frame_decryptor",
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api:scoped_refptr",
|
||||
"../api:simulated_network_api",
|
||||
"../api/rtc_event_log",
|
||||
|
||||
Reference in New Issue
Block a user