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

Unified Diff: webrtc/media/base/streamparams.h

Issue 2503403004: Add support for FEC-FR semantics in StreamParams. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/media/base/streamparams.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | webrtc/media/base/streamparams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698