OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 242 } |
243 // TODO(pthatcher): Remove this by giving mediamessage.cc access | 243 // TODO(pthatcher): Remove this by giving mediamessage.cc access |
244 // to MediaContentDescription | 244 // to MediaContentDescription |
245 StreamParamsVec& mutable_streams() { | 245 StreamParamsVec& mutable_streams() { |
246 return streams_; | 246 return streams_; |
247 } | 247 } |
248 void AddStream(const StreamParams& stream) { | 248 void AddStream(const StreamParams& stream) { |
249 streams_.push_back(stream); | 249 streams_.push_back(stream); |
250 } | 250 } |
251 // Legacy streams have an ssrc, but nothing else. | 251 // Legacy streams have an ssrc, but nothing else. |
252 void AddLegacyStream(uint32 ssrc) { | 252 void AddLegacyStream(uint32_t ssrc) { |
253 streams_.push_back(StreamParams::CreateLegacy(ssrc)); | 253 streams_.push_back(StreamParams::CreateLegacy(ssrc)); |
254 } | 254 } |
255 void AddLegacyStream(uint32 ssrc, uint32 fid_ssrc) { | 255 void AddLegacyStream(uint32_t ssrc, uint32_t fid_ssrc) { |
256 StreamParams sp = StreamParams::CreateLegacy(ssrc); | 256 StreamParams sp = StreamParams::CreateLegacy(ssrc); |
257 sp.AddFidSsrc(ssrc, fid_ssrc); | 257 sp.AddFidSsrc(ssrc, fid_ssrc); |
258 streams_.push_back(sp); | 258 streams_.push_back(sp); |
259 } | 259 } |
260 // Sets the CNAME of all StreamParams if it have not been set. | 260 // Sets the CNAME of all StreamParams if it have not been set. |
261 // This can be used to set the CNAME of legacy streams. | 261 // This can be used to set the CNAME of legacy streams. |
262 void SetCnameIfEmpty(const std::string& cname) { | 262 void SetCnameIfEmpty(const std::string& cname) { |
263 for (cricket::StreamParamsVec::iterator it = streams_.begin(); | 263 for (cricket::StreamParamsVec::iterator it = streams_.begin(); |
264 it != streams_.end(); ++it) { | 264 it != streams_.end(); ++it) { |
265 if (it->cname.empty()) | 265 if (it->cname.empty()) |
266 it->cname = cname; | 266 it->cname = cname; |
267 } | 267 } |
268 } | 268 } |
269 uint32 first_ssrc() const { | 269 uint32_t first_ssrc() const { |
270 if (streams_.empty()) { | 270 if (streams_.empty()) { |
271 return 0; | 271 return 0; |
272 } | 272 } |
273 return streams_[0].first_ssrc(); | 273 return streams_[0].first_ssrc(); |
274 } | 274 } |
275 bool has_ssrcs() const { | 275 bool has_ssrcs() const { |
276 if (streams_.empty()) { | 276 if (streams_.empty()) { |
277 return false; | 277 return false; |
278 } | 278 } |
279 return streams_[0].has_ssrcs(); | 279 return streams_[0].has_ssrcs(); |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 const DataContentDescription* GetFirstDataContentDescription( | 547 const DataContentDescription* GetFirstDataContentDescription( |
548 const SessionDescription* sdesc); | 548 const SessionDescription* sdesc); |
549 | 549 |
550 void GetSupportedAudioCryptoSuites(std::vector<std::string>* crypto_suites); | 550 void GetSupportedAudioCryptoSuites(std::vector<std::string>* crypto_suites); |
551 void GetSupportedVideoCryptoSuites(std::vector<std::string>* crypto_suites); | 551 void GetSupportedVideoCryptoSuites(std::vector<std::string>* crypto_suites); |
552 void GetSupportedDataCryptoSuites(std::vector<std::string>* crypto_suites); | 552 void GetSupportedDataCryptoSuites(std::vector<std::string>* crypto_suites); |
553 void GetDefaultSrtpCryptoSuiteNames(std::vector<std::string>* crypto_suites); | 553 void GetDefaultSrtpCryptoSuiteNames(std::vector<std::string>* crypto_suites); |
554 } // namespace cricket | 554 } // namespace cricket |
555 | 555 |
556 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ | 556 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ |
OLD | NEW |