Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 24 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
| 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
| 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 27 #include "webrtc/modules/video_coding/h264_sps_pps_tracker.h" | 27 #include "webrtc/modules/video_coding/h264_sps_pps_tracker.h" |
| 28 #include "webrtc/modules/video_coding/include/video_coding_defines.h" | 28 #include "webrtc/modules/video_coding/include/video_coding_defines.h" |
| 29 #include "webrtc/modules/video_coding/packet_buffer.h" | 29 #include "webrtc/modules/video_coding/packet_buffer.h" |
| 30 #include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" | 30 #include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" |
| 31 #include "webrtc/modules/video_coding/sequence_number_util.h" | 31 #include "webrtc/modules/video_coding/sequence_number_util.h" |
| 32 #include "webrtc/rtc_base/constructormagic.h" | 32 #include "webrtc/rtc_base/constructormagic.h" |
| 33 #include "webrtc/rtc_base/criticalsection.h" | 33 #include "webrtc/rtc_base/criticalsection.h" |
| 34 #include "webrtc/rtc_base/thread_checker.h" | |
| 34 #include "webrtc/typedefs.h" | 35 #include "webrtc/typedefs.h" |
| 35 #include "webrtc/video_receive_stream.h" | 36 #include "webrtc/video_receive_stream.h" |
| 36 | 37 |
| 37 namespace webrtc { | 38 namespace webrtc { |
| 38 | 39 |
| 39 class NackModule; | 40 class NackModule; |
| 40 class PacedSender; | 41 class PacedSender; |
| 41 class PacketRouter; | 42 class PacketRouter; |
| 42 class ProcessThread; | 43 class ProcessThread; |
| 43 class ReceiveStatistics; | 44 class ReceiveStatistics; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 | 136 |
| 136 // Implements OnCompleteFrameCallback. | 137 // Implements OnCompleteFrameCallback. |
| 137 void OnCompleteFrame( | 138 void OnCompleteFrame( |
| 138 std::unique_ptr<video_coding::FrameObject> frame) override; | 139 std::unique_ptr<video_coding::FrameObject> frame) override; |
| 139 | 140 |
| 140 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 141 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
| 141 | 142 |
| 142 rtc::Optional<int64_t> LastReceivedPacketMs() const; | 143 rtc::Optional<int64_t> LastReceivedPacketMs() const; |
| 143 rtc::Optional<int64_t> LastReceivedKeyframePacketMs() const; | 144 rtc::Optional<int64_t> LastReceivedKeyframePacketMs() const; |
| 144 | 145 |
| 146 void AddSecondarySink(RtpPacketSinkInterface* sink); | |
| 147 void RemoveSecondarySink(const RtpPacketSinkInterface* sink); | |
|
Taylor Brandstetter
2017/07/31 15:59:25
Can you add comments here documenting what a secon
eladalon
2017/07/31 16:46:03
I've added this in video_receive_stream.h (followi
Taylor Brandstetter
2017/07/31 17:31:29
Comments in one place are good, as long as we're c
| |
| 148 | |
| 145 private: | 149 private: |
| 146 bool AddReceiveCodec(const VideoCodec& video_codec); | 150 bool AddReceiveCodec(const VideoCodec& video_codec); |
| 147 void ReceivePacket(const uint8_t* packet, | 151 void ReceivePacket(const uint8_t* packet, |
| 148 size_t packet_length, | 152 size_t packet_length, |
| 149 const RTPHeader& header, | 153 const RTPHeader& header, |
| 150 bool in_order); | 154 bool in_order); |
| 151 // Parses and handles for instance RTX and RED headers. | 155 // Parses and handles for instance RTX and RED headers. |
| 152 // This function assumes that it's being called from only one thread. | 156 // This function assumes that it's being called from only one thread. |
| 153 void ParseAndHandleEncapsulatingHeader(const uint8_t* packet, | 157 void ParseAndHandleEncapsulatingHeader(const uint8_t* packet, |
| 154 size_t packet_length, | 158 size_t packet_length, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>> | 198 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>> |
| 195 last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_); | 199 last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_); |
| 196 video_coding::H264SpsPpsTracker tracker_; | 200 video_coding::H264SpsPpsTracker tracker_; |
| 197 // TODO(johan): Remove pt_codec_params_ once | 201 // TODO(johan): Remove pt_codec_params_ once |
| 198 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. | 202 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. |
| 199 // Maps a payload type to a map of out-of-band supplied codec parameters. | 203 // Maps a payload type to a map of out-of-band supplied codec parameters. |
| 200 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; | 204 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; |
| 201 int16_t last_payload_type_ = -1; | 205 int16_t last_payload_type_ = -1; |
| 202 | 206 |
| 203 bool has_received_frame_; | 207 bool has_received_frame_; |
| 208 | |
| 209 rtc::ThreadChecker worker_thread_checker_; | |
| 210 std::vector<RtpPacketSinkInterface*> secondary_sinks_ | |
| 211 GUARDED_BY(worker_thread_checker_); | |
| 204 }; | 212 }; |
| 205 | 213 |
| 206 } // namespace webrtc | 214 } // namespace webrtc |
| 207 | 215 |
| 208 #endif // WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ | 216 #endif // WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |
| OLD | NEW |