Remove sequenced task checker from FlexfecSender.
The packetization parts of this class are accessed from the encoder thread, which might change under different occasions. The use of a sequenced task checker here is thus incorrect, since that requires the access to always be on the same thread, whenever a task queue is not used. The access to the instantiated object of this class, at least when it comes to the RTP packetization parts, is however synchronized using the lock in PayloadRouter::OnEncodedImage. We can therefore safely remove the sequenced task checker. BUG=webrtc:5654 Review-Url: https://codereview.webrtc.org/2562983002 Cr-Commit-Position: refs/heads/master@{#15549}
This commit is contained in:
@ -29,6 +29,9 @@ namespace webrtc {
|
||||
|
||||
class RtpPacketToSend;
|
||||
|
||||
// Note that this class is not thread safe, and thus requires external
|
||||
// synchronization.
|
||||
|
||||
class FlexfecSender {
|
||||
public:
|
||||
FlexfecSender(int payload_type,
|
||||
@ -62,9 +65,8 @@ class FlexfecSender {
|
||||
private:
|
||||
// Utility.
|
||||
Clock* const clock_;
|
||||
Random random_ GUARDED_BY(sequence_checker_);
|
||||
int64_t last_generated_packet_ms_ GUARDED_BY(sequence_checker_);
|
||||
rtc::SequencedTaskChecker sequence_checker_;
|
||||
Random random_;
|
||||
int64_t last_generated_packet_ms_;
|
||||
|
||||
// Config.
|
||||
const int payload_type_;
|
||||
@ -72,10 +74,10 @@ class FlexfecSender {
|
||||
const uint32_t ssrc_;
|
||||
const uint32_t protected_media_ssrc_;
|
||||
// Sequence number of next packet to generate.
|
||||
uint16_t seq_num_ GUARDED_BY(sequence_checker_);
|
||||
uint16_t seq_num_;
|
||||
|
||||
// Implementation.
|
||||
UlpfecGenerator ulpfec_generator_ GUARDED_BY(sequence_checker_);
|
||||
UlpfecGenerator ulpfec_generator_;
|
||||
const RtpHeaderExtensionMap rtp_header_extension_map_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user