niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
leozwang@webrtc.org | 39e9659 | 2012-03-01 18:22:48 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |
| 12 | #define VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
pwestin@webrtc.org | 1da1ce0 | 2011-10-13 15:19:55 +0000 | [diff] [blame] | 14 | #include <list> |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 15 | #include <map> |
kwiberg | 27f982b | 2016-03-01 11:52:33 -0800 | [diff] [blame] | 16 | #include <memory> |
Peter Boström | 9c01725 | 2016-02-26 16:26:20 +0100 | [diff] [blame] | 17 | #include <string> |
kjellander@webrtc.org | 0fcaf99 | 2015-11-26 15:24:52 +0100 | [diff] [blame] | 18 | #include <vector> |
pwestin@webrtc.org | 1da1ce0 | 2011-10-13 15:19:55 +0000 | [diff] [blame] | 19 | |
Niels Möller | 2ff1f2a | 2018-08-09 16:16:34 +0200 | [diff] [blame] | 20 | #include "absl/types/optional.h" |
| 21 | |
Benjamin Wright | 192eeec | 2018-10-17 17:27:25 -0700 | [diff] [blame] | 22 | #include "api/crypto/framedecryptorinterface.h" |
Niels Möller | 2ff1f2a | 2018-08-09 16:16:34 +0200 | [diff] [blame] | 23 | #include "api/video_codecs/video_codec.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 24 | #include "call/rtp_packet_sink_interface.h" |
Niels Möller | df9e9ae | 2018-07-31 08:29:53 +0200 | [diff] [blame] | 25 | #include "call/syncable.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 26 | #include "call/video_receive_stream.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 27 | #include "modules/rtp_rtcp/include/receive_statistics.h" |
| 28 | #include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h" |
Niels Möller | b0573bc | 2017-09-25 10:47:00 +0200 | [diff] [blame] | 29 | #include "modules/rtp_rtcp/include/rtp_header_extension_map.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 30 | #include "modules/rtp_rtcp/include/rtp_rtcp.h" |
| 31 | #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
Jonas Oreland | 49ac595 | 2018-09-26 16:04:32 +0200 | [diff] [blame] | 32 | #include "modules/rtp_rtcp/source/contributing_sources.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 33 | #include "modules/video_coding/h264_sps_pps_tracker.h" |
| 34 | #include "modules/video_coding/include/video_coding_defines.h" |
| 35 | #include "modules/video_coding/packet_buffer.h" |
| 36 | #include "modules/video_coding/rtp_frame_reference_finder.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 37 | #include "rtc_base/constructormagic.h" |
| 38 | #include "rtc_base/criticalsection.h" |
Bjorn Terelius | a194e58 | 2017-10-25 13:07:09 +0200 | [diff] [blame] | 39 | #include "rtc_base/numerics/sequence_number_util.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 40 | #include "rtc_base/sequenced_task_checker.h" |
Benjamin Wright | 0076529 | 2018-11-30 16:18:26 -0800 | [diff] [blame^] | 41 | #include "rtc_base/thread_annotations.h" |
| 42 | #include "rtc_base/thread_checker.h" |
| 43 | #include "video/buffered_frame_decryptor.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 44 | |
mflodman@webrtc.org | ad4ee36 | 2011-11-28 22:39:24 +0000 | [diff] [blame] | 45 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 46 | |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 47 | class NackModule; |
mflodman | c0e58a3 | 2016-04-25 01:26:26 -0700 | [diff] [blame] | 48 | class PacketRouter; |
mflodman | dc7d0d2 | 2016-05-06 05:32:22 -0700 | [diff] [blame] | 49 | class ProcessThread; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 50 | class ReceiveStatistics; |
mflodman | cfc8e3b | 2016-05-03 21:22:04 -0700 | [diff] [blame] | 51 | class ReceiveStatisticsProxy; |
mflodman | c0e58a3 | 2016-04-25 01:26:26 -0700 | [diff] [blame] | 52 | class RtcpRttStats; |
nisse | 38cc1d6 | 2017-02-13 05:59:46 -0800 | [diff] [blame] | 53 | class RtpPacketReceived; |
mflodman | c0e58a3 | 2016-04-25 01:26:26 -0700 | [diff] [blame] | 54 | class Transport; |
brandtr | d55c3f6 | 2016-10-31 04:51:33 -0700 | [diff] [blame] | 55 | class UlpfecReceiver; |
Peter Boström | 0b25072 | 2016-04-22 18:23:15 +0200 | [diff] [blame] | 56 | |
philipel | 2837edc | 2018-10-02 13:55:47 +0200 | [diff] [blame] | 57 | class RtpVideoStreamReceiver : public RecoveredPacketReceiver, |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 58 | public RtpPacketSinkInterface, |
nisse | b1f2ff9 | 2017-06-09 04:01:55 -0700 | [diff] [blame] | 59 | public VCMFrameTypeCallback, |
| 60 | public VCMPacketRequestCallback, |
| 61 | public video_coding::OnReceivedFrameCallback, |
Benjamin Wright | 0076529 | 2018-11-30 16:18:26 -0800 | [diff] [blame^] | 62 | public video_coding::OnCompleteFrameCallback, |
| 63 | public OnDecryptedFrameCallback { |
mflodman@webrtc.org | ad4ee36 | 2011-11-28 22:39:24 +0000 | [diff] [blame] | 64 | public: |
nisse | b1f2ff9 | 2017-06-09 04:01:55 -0700 | [diff] [blame] | 65 | RtpVideoStreamReceiver( |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 66 | Transport* transport, |
| 67 | RtcpRttStats* rtt_stats, |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 68 | PacketRouter* packet_router, |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 69 | const VideoReceiveStream::Config* config, |
nisse | ca5706d | 2017-09-11 02:32:16 -0700 | [diff] [blame] | 70 | ReceiveStatistics* rtp_receive_statistics, |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 71 | ReceiveStatisticsProxy* receive_stats_proxy, |
| 72 | ProcessThread* process_thread, |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 73 | NackSender* nack_sender, |
| 74 | KeyFrameRequestSender* keyframe_request_sender, |
Benjamin Wright | 192eeec | 2018-10-17 17:27:25 -0700 | [diff] [blame] | 75 | video_coding::OnCompleteFrameCallback* complete_frame_callback, |
| 76 | rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor); |
Mirko Bonadei | 8fdcac3 | 2018-08-28 16:30:18 +0200 | [diff] [blame] | 77 | ~RtpVideoStreamReceiver() override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 78 | |
Niels Möller | 2ff1f2a | 2018-08-09 16:16:34 +0200 | [diff] [blame] | 79 | void AddReceiveCodec(const VideoCodec& video_codec, |
philipel | 022b54e | 2016-12-20 04:15:59 -0800 | [diff] [blame] | 80 | const std::map<std::string, std::string>& codec_params); |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 81 | |
mflodman@webrtc.org | ad4ee36 | 2011-11-28 22:39:24 +0000 | [diff] [blame] | 82 | void StartReceive(); |
| 83 | void StopReceive(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 84 | |
Niels Möller | df9e9ae | 2018-07-31 08:29:53 +0200 | [diff] [blame] | 85 | // Produces the transport-related timestamps; current_delay_ms is left unset. |
| 86 | absl::optional<Syncable::Info> GetSyncInfo() const; |
| 87 | |
Peter Boström | d1d66ba | 2016-02-08 14:07:14 +0100 | [diff] [blame] | 88 | bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 89 | |
philipel | d4fac69 | 2017-09-04 07:03:46 -0700 | [diff] [blame] | 90 | void FrameContinuous(int64_t seq_num); |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 91 | |
philipel | d4fac69 | 2017-09-04 07:03:46 -0700 | [diff] [blame] | 92 | void FrameDecoded(int64_t seq_num); |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 93 | |
mflodman | dc7d0d2 | 2016-05-06 05:32:22 -0700 | [diff] [blame] | 94 | void SignalNetworkState(NetworkState state); |
| 95 | |
Ilya Nikolaevskiy | d397a0d | 2018-02-21 15:57:09 +0100 | [diff] [blame] | 96 | // Returns number of different frames seen in the packet buffer. |
| 97 | int GetUniqueFramesSeen() const; |
| 98 | |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 99 | // Implements RtpPacketSinkInterface. |
| 100 | void OnRtpPacket(const RtpPacketReceived& packet) override; |
nisse | 38cc1d6 | 2017-02-13 05:59:46 -0800 | [diff] [blame] | 101 | |
philipel | 2837edc | 2018-10-02 13:55:47 +0200 | [diff] [blame] | 102 | // TODO(philipel): Stop using VCMPacket in the new jitter buffer and then |
| 103 | // remove this function. |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 104 | int32_t OnReceivedPayloadData(const uint8_t* payload_data, |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 105 | size_t payload_size, |
philipel | 2837edc | 2018-10-02 13:55:47 +0200 | [diff] [blame] | 106 | const WebRtcRTPHeader* rtp_header); |
| 107 | int32_t OnReceivedPayloadData( |
| 108 | const uint8_t* payload_data, |
| 109 | size_t payload_size, |
| 110 | const WebRtcRTPHeader* rtp_header, |
Ying Wang | b32bb95 | 2018-10-31 10:12:27 +0100 | [diff] [blame] | 111 | const absl::optional<RtpGenericFrameDescriptor>& generic_descriptor, |
| 112 | bool is_recovered); |
philipel | 2837edc | 2018-10-02 13:55:47 +0200 | [diff] [blame] | 113 | |
nisse | 30e8931 | 2017-05-29 08:16:37 -0700 | [diff] [blame] | 114 | // Implements RecoveredPacketReceiver. |
| 115 | void OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 116 | |
mflodman | cfc8e3b | 2016-05-03 21:22:04 -0700 | [diff] [blame] | 117 | // Implements VCMFrameTypeCallback. |
| 118 | int32_t RequestKeyFrame() override; |
mflodman | cfc8e3b | 2016-05-03 21:22:04 -0700 | [diff] [blame] | 119 | |
brandtr | f7c6d72 | 2016-12-08 08:25:47 -0800 | [diff] [blame] | 120 | bool IsUlpfecEnabled() const; |
mflodman | dc7d0d2 | 2016-05-06 05:32:22 -0700 | [diff] [blame] | 121 | bool IsRetransmissionsEnabled() const; |
| 122 | // Don't use, still experimental. |
| 123 | void RequestPacketRetransmit(const std::vector<uint16_t>& sequence_numbers); |
| 124 | |
mflodman | cfc8e3b | 2016-05-03 21:22:04 -0700 | [diff] [blame] | 125 | // Implements VCMPacketRequestCallback. |
| 126 | int32_t ResendPackets(const uint16_t* sequenceNumbers, |
| 127 | uint16_t length) override; |
| 128 | |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 129 | // Implements OnReceivedFrameCallback. |
| 130 | void OnReceivedFrame( |
| 131 | std::unique_ptr<video_coding::RtpFrameObject> frame) override; |
| 132 | |
| 133 | // Implements OnCompleteFrameCallback. |
| 134 | void OnCompleteFrame( |
philipel | e7c891f | 2018-02-22 14:35:06 +0100 | [diff] [blame] | 135 | std::unique_ptr<video_coding::EncodedFrame> frame) override; |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 136 | |
Benjamin Wright | 0076529 | 2018-11-30 16:18:26 -0800 | [diff] [blame^] | 137 | // Implements OnDecryptedFrameCallback. |
| 138 | void OnDecryptedFrame( |
| 139 | std::unique_ptr<video_coding::RtpFrameObject> frame) override; |
| 140 | |
Tommi | 81de14f | 2018-03-25 22:19:25 +0200 | [diff] [blame] | 141 | // Called by VideoReceiveStream when stats are updated. |
| 142 | void UpdateRtt(int64_t max_rtt_ms); |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 143 | |
Danil Chapovalov | b9b146c | 2018-06-15 12:28:07 +0200 | [diff] [blame] | 144 | absl::optional<int64_t> LastReceivedPacketMs() const; |
| 145 | absl::optional<int64_t> LastReceivedKeyframePacketMs() const; |
philipel | 3184f8e | 2017-05-18 08:08:53 -0700 | [diff] [blame] | 146 | |
eladalon | c0d481a | 2017-08-02 07:39:07 -0700 | [diff] [blame] | 147 | // RtpDemuxer only forwards a given RTP packet to one sink. However, some |
| 148 | // sinks, such as FlexFEC, might wish to be informed of all of the packets |
| 149 | // a given sink receives (or any set of sinks). They may do so by registering |
| 150 | // themselves as secondary sinks. |
| 151 | void AddSecondarySink(RtpPacketSinkInterface* sink); |
| 152 | void RemoveSecondarySink(const RtpPacketSinkInterface* sink); |
| 153 | |
Jonas Oreland | 49ac595 | 2018-09-26 16:04:32 +0200 | [diff] [blame] | 154 | std::vector<webrtc::RtpSource> GetSources() const; |
| 155 | |
mflodman@webrtc.org | ad4ee36 | 2011-11-28 22:39:24 +0000 | [diff] [blame] | 156 | private: |
Niels Möller | 2ff1f2a | 2018-08-09 16:16:34 +0200 | [diff] [blame] | 157 | // Entry point doing non-stats work for a received packet. Called |
| 158 | // for the same packet both before and after RED decapsulation. |
| 159 | void ReceivePacket(const RtpPacketReceived& packet); |
| 160 | // Parses and handles RED headers. |
stefan@webrtc.org | 7bb8f02 | 2013-09-06 13:40:11 +0000 | [diff] [blame] | 161 | // This function assumes that it's being called from only one thread. |
Niels Möller | 1f3206c | 2018-09-14 08:26:32 +0200 | [diff] [blame] | 162 | void ParseAndHandleEncapsulatingHeader(const RtpPacketReceived& packet); |
Niels Möller | bc01047 | 2018-03-23 13:22:29 +0100 | [diff] [blame] | 163 | void NotifyReceiverOfEmptyPacket(uint16_t seq_num); |
asapersson@webrtc.org | 0800db7 | 2015-01-15 07:40:20 +0000 | [diff] [blame] | 164 | void UpdateHistograms(); |
brandtr | e6f98c7 | 2016-11-11 03:28:30 -0800 | [diff] [blame] | 165 | bool IsRedEnabled() const; |
philipel | 022b54e | 2016-12-20 04:15:59 -0800 | [diff] [blame] | 166 | void InsertSpsPpsIntoTracker(uint8_t payload_type); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 167 | |
Peter Boström | 4fa7eca | 2016-03-02 15:05:53 +0100 | [diff] [blame] | 168 | Clock* const clock_; |
Tommi | 733b547 | 2016-06-10 17:58:01 +0200 | [diff] [blame] | 169 | // Ownership of this object lies with VideoReceiveStream, which owns |this|. |
| 170 | const VideoReceiveStream::Config& config_; |
mflodman | c0e58a3 | 2016-04-25 01:26:26 -0700 | [diff] [blame] | 171 | PacketRouter* const packet_router_; |
mflodman | dc7d0d2 | 2016-05-06 05:32:22 -0700 | [diff] [blame] | 172 | ProcessThread* const process_thread_; |
Peter Boström | 4fa7eca | 2016-03-02 15:05:53 +0100 | [diff] [blame] | 173 | |
| 174 | RemoteNtpTimeEstimator ntp_estimator_; |
Peter Boström | 4fa7eca | 2016-03-02 15:05:53 +0100 | [diff] [blame] | 175 | |
Niels Möller | b0573bc | 2017-09-25 10:47:00 +0200 | [diff] [blame] | 176 | RtpHeaderExtensionMap rtp_header_extensions_; |
nisse | ca5706d | 2017-09-11 02:32:16 -0700 | [diff] [blame] | 177 | ReceiveStatistics* const rtp_receive_statistics_; |
brandtr | d55c3f6 | 2016-10-31 04:51:33 -0700 | [diff] [blame] | 178 | std::unique_ptr<UlpfecReceiver> ulpfec_receiver_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 179 | |
eladalon | 8b07305 | 2017-08-25 00:49:08 -0700 | [diff] [blame] | 180 | rtc::SequencedTaskChecker worker_task_checker_; |
danilchap | a37de39 | 2017-09-09 04:17:22 -0700 | [diff] [blame] | 181 | bool receiving_ RTC_GUARDED_BY(worker_task_checker_); |
danilchap | a37de39 | 2017-09-09 04:17:22 -0700 | [diff] [blame] | 182 | int64_t last_packet_log_ms_ RTC_GUARDED_BY(worker_task_checker_); |
mflodman | c0e58a3 | 2016-04-25 01:26:26 -0700 | [diff] [blame] | 183 | |
| 184 | const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 185 | |
| 186 | // Members for the new jitter buffer experiment. |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 187 | video_coding::OnCompleteFrameCallback* complete_frame_callback_; |
| 188 | KeyFrameRequestSender* keyframe_request_sender_; |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 189 | std::unique_ptr<NackModule> nack_module_; |
| 190 | rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_; |
| 191 | std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_; |
| 192 | rtc::CriticalSection last_seq_num_cs_; |
philipel | d4fac69 | 2017-09-04 07:03:46 -0700 | [diff] [blame] | 193 | std::map<int64_t, uint16_t> last_seq_num_for_pic_id_ |
danilchap | a37de39 | 2017-09-09 04:17:22 -0700 | [diff] [blame] | 194 | RTC_GUARDED_BY(last_seq_num_cs_); |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 195 | video_coding::H264SpsPpsTracker tracker_; |
Niels Möller | 2ff1f2a | 2018-08-09 16:16:34 +0200 | [diff] [blame] | 196 | |
Niels Möller | 2ff1f2a | 2018-08-09 16:16:34 +0200 | [diff] [blame] | 197 | std::map<uint8_t, VideoCodecType> pt_codec_type_; |
philipel | 022b54e | 2016-12-20 04:15:59 -0800 | [diff] [blame] | 198 | // TODO(johan): Remove pt_codec_params_ once |
| 199 | // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. |
| 200 | // Maps a payload type to a map of out-of-band supplied codec parameters. |
| 201 | std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; |
| 202 | int16_t last_payload_type_ = -1; |
philipel | 2c53b13 | 2017-05-16 08:06:30 -0700 | [diff] [blame] | 203 | |
| 204 | bool has_received_frame_; |
eladalon | c0d481a | 2017-08-02 07:39:07 -0700 | [diff] [blame] | 205 | |
eladalon | 8b07305 | 2017-08-25 00:49:08 -0700 | [diff] [blame] | 206 | std::vector<RtpPacketSinkInterface*> secondary_sinks_ |
danilchap | a37de39 | 2017-09-09 04:17:22 -0700 | [diff] [blame] | 207 | RTC_GUARDED_BY(worker_task_checker_); |
Jonas Oreland | 49ac595 | 2018-09-26 16:04:32 +0200 | [diff] [blame] | 208 | |
| 209 | // Info for GetSources and GetSyncInfo is updated on network or worker thread, |
| 210 | // queried on the worker thread. |
| 211 | rtc::CriticalSection rtp_sources_lock_; |
| 212 | ContributingSources contributing_sources_ RTC_GUARDED_BY(&rtp_sources_lock_); |
| 213 | absl::optional<uint32_t> last_received_rtp_timestamp_ |
| 214 | RTC_GUARDED_BY(rtp_sources_lock_); |
| 215 | absl::optional<int64_t> last_received_rtp_system_time_ms_ |
| 216 | RTC_GUARDED_BY(rtp_sources_lock_); |
Benjamin Wright | 192eeec | 2018-10-17 17:27:25 -0700 | [diff] [blame] | 217 | |
Benjamin Wright | 0076529 | 2018-11-30 16:18:26 -0800 | [diff] [blame^] | 218 | // Used to validate the buffered frame decryptor is always run on the correct |
| 219 | // thread. |
| 220 | rtc::ThreadChecker network_tc_; |
| 221 | // Handles incoming encrypted frames and forwards them to the |
| 222 | // rtp_reference_finder if they are decryptable. |
| 223 | std::unique_ptr<BufferedFrameDecryptor> buffered_frame_decryptor_ |
| 224 | RTC_PT_GUARDED_BY(network_tc_); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 225 | }; |
mflodman@webrtc.org | ad4ee36 | 2011-11-28 22:39:24 +0000 | [diff] [blame] | 226 | |
kjellander@webrtc.org | 0fcaf99 | 2015-11-26 15:24:52 +0100 | [diff] [blame] | 227 | } // namespace webrtc |
mflodman@webrtc.org | ad4ee36 | 2011-11-28 22:39:24 +0000 | [diff] [blame] | 228 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 229 | #endif // VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |