Index: webrtc/media/base/streamparams.h |
diff --git a/webrtc/media/base/streamparams.h b/webrtc/media/base/streamparams.h |
index 5b9d7bd2ef23e518305a3746c522663f68b170a1..eb1781a9c4cee14542b1404c2dab52a14edd7846 100644 |
--- a/webrtc/media/base/streamparams.h |
+++ b/webrtc/media/base/streamparams.h |
@@ -37,6 +37,7 @@ |
namespace cricket { |
extern const char kFecSsrcGroupSemantics[]; |
+extern const char kFecFrSsrcGroupSemantics[]; |
extern const char kFidSsrcGroupSemantics[]; |
extern const char kSimSsrcGroupSemantics[]; |
@@ -122,6 +123,18 @@ struct StreamParams { |
return GetSecondarySsrc(kFidSsrcGroupSemantics, primary_ssrc, fid_ssrc); |
} |
+ // Convenience function to add an FEC-FR ssrc for a primary_ssrc |
+ // that's already been added. |
+ inline bool AddFecFrSsrc(uint32_t primary_ssrc, uint32_t fecfr_ssrc) { |
magjed_webrtc
2016/11/22 08:22:18
nit: you don't really need inline here since membe
brandtr
2016/11/22 08:40:30
Removed :)
|
+ return AddSecondarySsrc(kFecFrSsrcGroupSemantics, primary_ssrc, fecfr_ssrc); |
+ } |
+ |
+ // Convenience function to lookup the FEC-FR ssrc for a primary_ssrc. |
+ // Returns false if primary_ssrc not found or FEC-FR not defined for it. |
+ inline bool GetFecFrSsrc(uint32_t primary_ssrc, uint32_t* fecfr_ssrc) const { |
+ return GetSecondarySsrc(kFecFrSsrcGroupSemantics, primary_ssrc, fecfr_ssrc); |
+ } |
+ |
// Convenience to get all the SIM SSRCs if there are SIM ssrcs, or |
// the first SSRC otherwise. |
void GetPrimarySsrcs(std::vector<uint32_t>* ssrcs) const; |
@@ -289,8 +302,8 @@ inline bool RemoveStreamByIds(StreamParamsVec* streams, |
} |
// Checks if |sp| defines parameters for a single primary stream. There may |
-// be an RTX stream associated with the primary stream. Leaving as non-static so |
-// we can test this function. |
+// be an RTX stream or a FlexFEC stream (or both) associated with the primary |
+// stream. Leaving as non-static so we can test this function. |
bool IsOneSsrcStream(const StreamParams& sp); |
// Checks if |sp| defines parameters for one Simulcast stream. There may be RTX |