Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: webrtc/video/rtp_stream_receiver.h

Issue 2853503002: Dont request keyframes if the stream is inactive or if we are currently receiving a keyframe. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Implements OnReceivedFrameCallback. 128 // Implements OnReceivedFrameCallback.
129 void OnReceivedFrame( 129 void OnReceivedFrame(
130 std::unique_ptr<video_coding::RtpFrameObject> frame) override; 130 std::unique_ptr<video_coding::RtpFrameObject> frame) override;
131 131
132 // Implements OnCompleteFrameCallback. 132 // Implements OnCompleteFrameCallback.
133 void OnCompleteFrame( 133 void OnCompleteFrame(
134 std::unique_ptr<video_coding::FrameObject> frame) override; 134 std::unique_ptr<video_coding::FrameObject> frame) override;
135 135
136 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; 136 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override;
137 137
138 rtc::Optional<int64_t> LastReceivedPacketMs() const;
139 rtc::Optional<int64_t> LastReceivedKeyframePacketMs() const;
140
138 private: 141 private:
139 bool AddReceiveCodec(const VideoCodec& video_codec); 142 bool AddReceiveCodec(const VideoCodec& video_codec);
140 bool ReceivePacket(const uint8_t* packet, 143 bool ReceivePacket(const uint8_t* packet,
141 size_t packet_length, 144 size_t packet_length,
142 const RTPHeader& header, 145 const RTPHeader& header,
143 bool in_order); 146 bool in_order);
144 // Parses and handles for instance RTX and RED headers. 147 // Parses and handles for instance RTX and RED headers.
145 // This function assumes that it's being called from only one thread. 148 // This function assumes that it's being called from only one thread.
146 bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet, 149 bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet,
147 size_t packet_length, 150 size_t packet_length,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // TODO(johan): Remove pt_codec_params_ once 193 // TODO(johan): Remove pt_codec_params_ once
191 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. 194 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved.
192 // Maps a payload type to a map of out-of-band supplied codec parameters. 195 // Maps a payload type to a map of out-of-band supplied codec parameters.
193 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; 196 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_;
194 int16_t last_payload_type_ = -1; 197 int16_t last_payload_type_ = -1;
195 }; 198 };
196 199
197 } // namespace webrtc 200 } // namespace webrtc
198 201
199 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ 202 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698