Moved NackModule and VCMPacket to their own targets

Bug: webrtc:9373
Change-Id: I1e882b734dcafb5c633eabf08bb8a1a6a407a251
Reviewed-on: https://webrtc-review.googlesource.com/81744
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23621}
This commit is contained in:
Ilya Nikolaevskiy
2018-06-07 16:15:40 +02:00
committed by Commit Bot
parent 88aee288f8
commit 8643b78750
10 changed files with 76 additions and 35 deletions

View File

@ -268,6 +268,33 @@ class CallStatsObserver {
virtual ~CallStatsObserver() {} virtual ~CallStatsObserver() {}
}; };
// Interface used by NackModule and JitterBuffer.
class NackSender {
public:
virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
protected:
virtual ~NackSender() {}
};
// Interface used by NackModule and JitterBuffer.
class KeyFrameRequestSender {
public:
virtual void RequestKeyFrame() = 0;
protected:
virtual ~KeyFrameRequestSender() {}
};
// Used to indicate if a received packet contain a complete NALU (or equivalent)
enum VCMNaluCompleteness {
kNaluUnset = 0, // Packet has not been filled.
kNaluComplete = 1, // Packet can be decoded as is.
kNaluStart, // Packet contain beginning of NALU
kNaluIncomplete, // Packet is not beginning or end of NALU
kNaluEnd, // Packet is the end of a NALU
};
} // namespace webrtc } // namespace webrtc
#endif // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ #endif // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_

View File

@ -36,6 +36,46 @@ rtc_static_library("encoded_frame") {
} }
} }
rtc_static_library("nack_module") {
visibility = [ "*" ]
sources = [
"histogram.cc",
"histogram.h",
"nack_module.cc",
"nack_module.h",
]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
":packet",
"..:module_api",
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_numerics",
"../../system_wrappers",
"../utility:utility",
]
}
rtc_static_library("packet") {
visibility = [ "*" ]
sources = [
"packet.cc",
"packet.h",
]
deps = [
"..:module_api",
"../../:typedefs",
]
}
rtc_static_library("video_coding") { rtc_static_library("video_coding") {
visibility = [ "*" ] visibility = [ "*" ]
deps = [] deps = []
@ -66,8 +106,6 @@ rtc_static_library("video_coding") {
"h264_sprop_parameter_sets.h", "h264_sprop_parameter_sets.h",
"h264_sps_pps_tracker.cc", "h264_sps_pps_tracker.cc",
"h264_sps_pps_tracker.h", "h264_sps_pps_tracker.h",
"histogram.cc",
"histogram.h",
"include/video_codec_initializer.h", "include/video_codec_initializer.h",
"include/video_coding.h", "include/video_coding.h",
"inter_frame_delay.cc", "inter_frame_delay.cc",
@ -83,10 +121,6 @@ rtc_static_library("video_coding") {
"media_optimization.cc", "media_optimization.cc",
"media_optimization.h", "media_optimization.h",
"nack_fec_tables.h", "nack_fec_tables.h",
"nack_module.cc",
"nack_module.h",
"packet.cc",
"packet.h",
"packet_buffer.cc", "packet_buffer.cc",
"packet_buffer.h", "packet_buffer.h",
"qp_parser.cc", "qp_parser.cc",
@ -121,6 +155,7 @@ rtc_static_library("video_coding") {
deps += [ deps += [
":codec_globals_headers", ":codec_globals_headers",
":encoded_frame", ":encoded_frame",
":packet",
":video_codec_interface", ":video_codec_interface",
":video_coding_utility", ":video_coding_utility",
":webrtc_vp8_helpers", ":webrtc_vp8_helpers",
@ -814,6 +849,8 @@ if (rtc_include_tests) {
":codec_globals_headers", ":codec_globals_headers",
":encoded_frame", ":encoded_frame",
":mock_headers", ":mock_headers",
":nack_module",
":packet",
":video_codec_interface", ":video_codec_interface",
":video_codecs_test_framework", ":video_codecs_test_framework",
":video_coding", ":video_coding",

View File

@ -131,22 +131,6 @@ class VCMPacketRequestCallback {
virtual ~VCMPacketRequestCallback() {} virtual ~VCMPacketRequestCallback() {}
}; };
class NackSender {
public:
virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
protected:
virtual ~NackSender() {}
};
class KeyFrameRequestSender {
public:
virtual void RequestKeyFrame() = 0;
protected:
virtual ~KeyFrameRequestSender() {}
};
} // namespace webrtc } // namespace webrtc
#endif // MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ #endif // MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_

View File

@ -25,7 +25,6 @@
#include "modules/video_coding/inter_frame_delay.h" #include "modules/video_coding/inter_frame_delay.h"
#include "modules/video_coding/jitter_buffer_common.h" #include "modules/video_coding/jitter_buffer_common.h"
#include "modules/video_coding/jitter_estimator.h" #include "modules/video_coding/jitter_estimator.h"
#include "modules/video_coding/nack_module.h"
#include "rtc_base/constructormagic.h" #include "rtc_base/constructormagic.h"
#include "rtc_base/criticalsection.h" #include "rtc_base/criticalsection.h"
#include "rtc_base/thread_annotations.h" #include "rtc_base/thread_annotations.h"

View File

@ -58,15 +58,6 @@ enum VCMFrameBufferStateEnum {
}; };
enum { kH264StartCodeLengthBytes = 4 }; enum { kH264StartCodeLengthBytes = 4 };
// Used to indicate if a received packet contain a complete NALU (or equivalent)
enum VCMNaluCompleteness {
kNaluUnset = 0, // Packet has not been filled.
kNaluComplete = 1, // Packet can be decoded as is.
kNaluStart, // Packet contain beginning of NALU
kNaluIncomplete, // Packet is not beginning or end of NALU
kNaluEnd, // Packet is the end of a NALU
};
} // namespace webrtc } // namespace webrtc
#endif // MODULES_VIDEO_CODING_JITTER_BUFFER_COMMON_H_ #endif // MODULES_VIDEO_CODING_JITTER_BUFFER_COMMON_H_

View File

@ -16,8 +16,8 @@
#include <set> #include <set>
#include "modules/include/module.h" #include "modules/include/module.h"
#include "modules/include/module_common_types.h"
#include "modules/video_coding/histogram.h" #include "modules/video_coding/histogram.h"
#include "modules/video_coding/include/video_coding_defines.h"
#include "modules/video_coding/packet.h" #include "modules/video_coding/packet.h"
#include "rtc_base/criticalsection.h" #include "rtc_base/criticalsection.h"
#include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/numerics/sequence_number_util.h"

View File

@ -12,7 +12,6 @@
#define MODULES_VIDEO_CODING_PACKET_H_ #define MODULES_VIDEO_CODING_PACKET_H_
#include "modules/include/module_common_types.h" #include "modules/include/module_common_types.h"
#include "modules/video_coding/jitter_buffer_common.h"
#include "typedefs.h" // NOLINT(build/include) #include "typedefs.h" // NOLINT(build/include)
namespace webrtc { namespace webrtc {

View File

@ -9,7 +9,7 @@
*/ */
#include "modules/video_coding/session_info.h" #include "modules/video_coding/session_info.h"
#include "modules/video_coding/jitter_buffer_common.h"
#include "modules/video_coding/packet.h" #include "modules/video_coding/packet.h"
#include "rtc_base/logging.h" #include "rtc_base/logging.h"

View File

@ -74,6 +74,8 @@ rtc_static_library("video") {
"../call:video_stream_api", "../call:video_stream_api",
"../modules/rtp_rtcp:rtp_rtcp_format", "../modules/rtp_rtcp:rtp_rtcp_format",
"../modules/video_coding:codec_globals_headers", "../modules/video_coding:codec_globals_headers",
"../modules/video_coding:nack_module",
"../modules/video_coding:packet",
"../modules/video_coding:video_codec_interface", "../modules/video_coding:video_codec_interface",
"../rtc_base:checks", "../rtc_base:checks",
"../rtc_base:stringutils", "../rtc_base:stringutils",
@ -387,6 +389,7 @@ if (rtc_include_tests) {
"../modules/utility", "../modules/utility",
"../modules/video_coding", "../modules/video_coding",
"../modules/video_coding:codec_globals_headers", "../modules/video_coding:codec_globals_headers",
"../modules/video_coding:packet",
"../modules/video_coding:video_codec_interface", "../modules/video_coding:video_codec_interface",
"../modules/video_coding:video_coding_utility", "../modules/video_coding:video_coding_utility",
"../modules/video_coding:webrtc_h264", "../modules/video_coding:webrtc_h264",

View File

@ -28,6 +28,7 @@
#include "modules/video_coding/frame_object.h" #include "modules/video_coding/frame_object.h"
#include "modules/video_coding/h264_sprop_parameter_sets.h" #include "modules/video_coding/h264_sprop_parameter_sets.h"
#include "modules/video_coding/h264_sps_pps_tracker.h" #include "modules/video_coding/h264_sps_pps_tracker.h"
#include "modules/video_coding/nack_module.h"
#include "modules/video_coding/packet_buffer.h" #include "modules/video_coding/packet_buffer.h"
#include "modules/video_coding/video_coding_impl.h" #include "modules/video_coding/video_coding_impl.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"