| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 |
| 11 // This file contains structures for describing SSRCs from a media source such | 11 // This file contains structures for describing SSRCs from a media source such |
| 12 // as a MediaStreamTrack when it is sent across an RTP session. Multiple media | 12 // as a MediaStreamTrack when it is sent across an RTP session. Multiple media |
| 13 // sources may be sent across the same RTP session, each of them will be | 13 // sources may be sent across the same RTP session, each of them will be |
| 14 // described by one StreamParams object | 14 // described by one StreamParams object |
| 15 // SsrcGroup is used to describe the relationship between the SSRCs that | 15 // SsrcGroup is used to describe the relationship between the SSRCs that |
| 16 // are used for this media source. | 16 // are used for this media source. |
| 17 // E.x: Consider a source that is sent as 3 simulcast streams | 17 // E.x: Consider a source that is sent as 3 simulcast streams |
| 18 // Let the simulcast elements have SSRC 10, 20, 30. | 18 // Let the simulcast elements have SSRC 10, 20, 30. |
| 19 // Let each simulcast element use FEC and let the protection packets have | 19 // Let each simulcast element use FEC and let the protection packets have |
| 20 // SSRC 11,21,31. | 20 // SSRC 11,21,31. |
| 21 // To describe this 4 SsrcGroups are needed, | 21 // To describe this 4 SsrcGroups are needed, |
| 22 // StreamParams would then contain ssrc = {10,11,20,21,30,31} and | 22 // StreamParams would then contain ssrc = {10,11,20,21,30,31} and |
| 23 // ssrc_groups = {{SIM,{10,20,30}, {FEC,{10,11}, {FEC, {20,21}, {FEC {30,31}}} | 23 // ssrc_groups = {{SIM,{10,20,30}, {FEC,{10,11}, {FEC, {20,21}, {FEC {30,31}}} |
| 24 // Please see RFC 5576. | 24 // Please see RFC 5576. |
| 25 | 25 |
| 26 #ifndef WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ | 26 #ifndef WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ |
| 27 #define WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ | 27 #define WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ |
| 28 | 28 |
| 29 #include <stdint.h> | |
| 30 | |
| 31 #include <algorithm> | 29 #include <algorithm> |
| 32 #include <set> | 30 #include <set> |
| 33 #include <string> | 31 #include <string> |
| 34 #include <vector> | 32 #include <vector> |
| 35 | 33 |
| 34 #include "webrtc/base/basictypes.h" |
| 36 #include "webrtc/base/constructormagic.h" | 35 #include "webrtc/base/constructormagic.h" |
| 37 | 36 |
| 38 namespace cricket { | 37 namespace cricket { |
| 39 | 38 |
| 40 extern const char kFecSsrcGroupSemantics[]; | 39 extern const char kFecSsrcGroupSemantics[]; |
| 41 extern const char kFecFrSsrcGroupSemantics[]; | 40 extern const char kFecFrSsrcGroupSemantics[]; |
| 42 extern const char kFidSsrcGroupSemantics[]; | 41 extern const char kFidSsrcGroupSemantics[]; |
| 43 extern const char kSimSsrcGroupSemantics[]; | 42 extern const char kSimSsrcGroupSemantics[]; |
| 44 | 43 |
| 45 struct SsrcGroup { | 44 struct SsrcGroup { |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 bool IsOneSsrcStream(const StreamParams& sp); | 307 bool IsOneSsrcStream(const StreamParams& sp); |
| 309 | 308 |
| 310 // Checks if |sp| defines parameters for one Simulcast stream. There may be RTX | 309 // Checks if |sp| defines parameters for one Simulcast stream. There may be RTX |
| 311 // streams associated with the simulcast streams. Leaving as non-static so we | 310 // streams associated with the simulcast streams. Leaving as non-static so we |
| 312 // can test this function. | 311 // can test this function. |
| 313 bool IsSimulcastStream(const StreamParams& sp); | 312 bool IsSimulcastStream(const StreamParams& sp); |
| 314 | 313 |
| 315 } // namespace cricket | 314 } // namespace cricket |
| 316 | 315 |
| 317 #endif // WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ | 316 #endif // WEBRTC_MEDIA_BASE_STREAMPARAMS_H_ |
| OLD | NEW |