Home | History | Annotate | Download | only in base

Lines Matching refs:ssrcs

103 static std::string SsrcsToString(const std::vector<uint32_t>& ssrcs) {
105 ost << "ssrcs:[";
106 for (std::vector<uint32_t>::const_iterator it = ssrcs.begin();
107 it != ssrcs.end(); ++it) {
108 if (it != ssrcs.begin()) {
118 return (semantics == semantics_in && ssrcs.size() > 0);
125 ost << SsrcsToString(ssrcs);
139 ost << SsrcsToString(ssrcs) << ";";
164 void StreamParams::GetPrimarySsrcs(std::vector<uint32_t>* ssrcs) const {
167 ssrcs->push_back(first_ssrc());
169 for (size_t i = 0; i < sim_group->ssrcs.size(); ++i) {
170 ssrcs->push_back(sim_group->ssrcs[i]);
192 ssrcs.push_back(secondary_ssrc);
207 it->ssrcs.size() >= 2 &&
208 it->ssrcs[0] == primary_ssrc) {
209 *secondary_ssrc = it->ssrcs[1];
217 if (sp.ssrcs.size() == 1 && sp.ssrc_groups.empty()) {
220 if (sp.ssrcs.size() == 2) {
223 return (sp.ssrcs == fid_group->ssrcs);
229 static void RemoveFirst(std::list<uint32_t>* ssrcs, uint32_t value) {
231 std::find(ssrcs->begin(), ssrcs->end(), value);
232 if (it != ssrcs->end()) {
233 ssrcs->erase(it);
239 if (sg == NULL || sg->ssrcs.size() < 2) {
242 // Start with all StreamParams SSRCs. Remove simulcast SSRCs (from sg) and
243 // RTX SSRCs. If we still have SSRCs left, we don't know what they're for.
244 // Also we remove first-found SSRCs only. So duplicates should lead to errors.
245 std::list<uint32_t> sp_ssrcs(sp.ssrcs.begin(), sp.ssrcs.end());
246 for (size_t i = 0; i < sg->ssrcs.size(); ++i) {
247 RemoveFirst(&sp_ssrcs, sg->ssrcs[i]);
252 group.ssrcs.size() != 2) {
255 RemoveFirst(&sp_ssrcs, group.ssrcs[1]);
257 // If there's SSRCs left that we don't know how to handle, we bail out.