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

Side by Side Diff: webrtc/common_types.h

Issue 2920993002: Add RSID-based demuxing to RtpDemuxer (Closed)
Patch Set: Missed one cast. Created 3 years, 6 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/call/rtp_demuxer_unittest.cc ('k') | webrtc/common_types.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) 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 700
701 // Class to represent RtpStreamId which is a string. 701 // Class to represent RtpStreamId which is a string.
702 // Unlike std::string, it can be copied with memcpy and cleared with memset. 702 // Unlike std::string, it can be copied with memcpy and cleared with memset.
703 // Empty value represent unset RtpStreamId. 703 // Empty value represent unset RtpStreamId.
704 class StreamId { 704 class StreamId {
705 public: 705 public:
706 // Stream id is limited to 16 bytes because it is the maximum length 706 // Stream id is limited to 16 bytes because it is the maximum length
707 // that can be encoded with one-byte header extensions. 707 // that can be encoded with one-byte header extensions.
708 static constexpr size_t kMaxSize = 16; 708 static constexpr size_t kMaxSize = 16;
709 709
710 static bool IsLegalName(rtc::ArrayView<const char> name);
711
710 StreamId() { value_[0] = 0; } 712 StreamId() { value_[0] = 0; }
711 explicit StreamId(rtc::ArrayView<const char> value) { 713 explicit StreamId(rtc::ArrayView<const char> value) {
712 Set(value.data(), value.size()); 714 Set(value.data(), value.size());
713 } 715 }
714 StreamId(const StreamId&) = default; 716 StreamId(const StreamId&) = default;
715 StreamId& operator=(const StreamId&) = default; 717 StreamId& operator=(const StreamId&) = default;
716 718
717 bool empty() const { return value_[0] == 0; } 719 bool empty() const { return value_[0] == 0; }
718 const char* data() const { return value_; } 720 const char* data() const { return value_; }
719 size_t size() const { return strnlen(value_, kMaxSize); } 721 size_t size() const { return strnlen(value_, kMaxSize); }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 enum class RtcpMode { kOff, kCompound, kReducedSize }; 888 enum class RtcpMode { kOff, kCompound, kReducedSize };
887 889
888 enum NetworkState { 890 enum NetworkState {
889 kNetworkUp, 891 kNetworkUp,
890 kNetworkDown, 892 kNetworkDown,
891 }; 893 };
892 894
893 } // namespace webrtc 895 } // namespace webrtc
894 896
895 #endif // WEBRTC_COMMON_TYPES_H_ 897 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « webrtc/call/rtp_demuxer_unittest.cc ('k') | webrtc/common_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698