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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet.h

Issue 1461623003: rtcp::Nack packet moved into own file and got Parse function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 12 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 const size_t kFciLength = 4; 320 const size_t kFciLength = 4;
321 return kCommonFbFmtLength + kFciLength; 321 return kCommonFbFmtLength + kFciLength;
322 } 322 }
323 323
324 RTCPUtility::RTCPPacketPSFBSLI sli_; 324 RTCPUtility::RTCPPacketPSFBSLI sli_;
325 RTCPUtility::RTCPPacketPSFBSLIItem sli_item_; 325 RTCPUtility::RTCPPacketPSFBSLIItem sli_item_;
326 326
327 RTC_DISALLOW_COPY_AND_ASSIGN(Sli); 327 RTC_DISALLOW_COPY_AND_ASSIGN(Sli);
328 }; 328 };
329 329
330 // Generic NACK (RFC 4585).
331 //
332 // FCI:
333 // 0 1 2 3
334 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
335 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
336 // | PID | BLP |
337 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
338
339 class Nack : public RtcpPacket {
340 public:
341 Nack() : RtcpPacket() {
342 memset(&nack_, 0, sizeof(nack_));
343 }
344
345 virtual ~Nack() {}
346
347 void From(uint32_t ssrc) {
348 nack_.SenderSSRC = ssrc;
349 }
350 void To(uint32_t ssrc) {
351 nack_.MediaSSRC = ssrc;
352 }
353 void WithList(const uint16_t* nack_list, int length);
354
355 protected:
356 bool Create(uint8_t* packet,
357 size_t* index,
358 size_t max_length,
359 RtcpPacket::PacketReadyCallback* callback) const override;
360
361 size_t BlockLength() const override;
362
363 private:
364 RTCPUtility::RTCPPacketRTPFBNACK nack_;
365 std::vector<RTCPUtility::RTCPPacketRTPFBNACKItem> nack_fields_;
366
367 RTC_DISALLOW_COPY_AND_ASSIGN(Nack);
368 };
369
370 // Reference picture selection indication (RPSI) (RFC 4585). 330 // Reference picture selection indication (RPSI) (RFC 4585).
371 // 331 //
372 // FCI: 332 // FCI:
373 // 333 //
374 // 0 1 2 3 334 // 0 1 2 3
375 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 335 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
376 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 336 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
377 // | PB |0| Payload Type| Native RPSI bit string | 337 // | PB |0| Payload Type| Native RPSI bit string |
378 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 338 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
379 // | defined per codec ... | Padding (0) | 339 // | defined per codec ... | Padding (0) |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 667
708 private: 668 private:
709 const size_t buffer_length_; 669 const size_t buffer_length_;
710 size_t length_; 670 size_t length_;
711 rtc::scoped_ptr<uint8_t[]> buffer_; 671 rtc::scoped_ptr<uint8_t[]> buffer_;
712 }; 672 };
713 673
714 } // namespace rtcp 674 } // namespace rtcp
715 } // namespace webrtc 675 } // namespace webrtc
716 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_H_ 676 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698