mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
RTC: fix SrsSessionInfo about copy assignment operator and comparison operator.
This commit is contained in:
parent
36cbe851ca
commit
7c1d3edd36
4 changed files with 16 additions and 3 deletions
|
@ -6,6 +6,7 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 4.0 Changelog
|
## SRS 4.0 Changelog
|
||||||
|
|
||||||
|
* v4.0, 2021-08-14, RTC: Merge [#2533](https://github.com/ossrs/srs/pull/2533), fix SDP comparison bug. 4.0.154
|
||||||
* v4.0, 2021-08-13, RTC: Merge [#2526](https://github.com/ossrs/srs/pull/2526), fix codec issue for G.711 or H.263. 4.0.152
|
* v4.0, 2021-08-13, RTC: Merge [#2526](https://github.com/ossrs/srs/pull/2526), fix codec issue for G.711 or H.263. 4.0.152
|
||||||
* v4.0, 2021-08-10, RTC: Merge [#2509](https://github.com/ossrs/srs/pull/2514), support http hooks n_play/stop/publish/unpublish. 4.0.151
|
* v4.0, 2021-08-10, RTC: Merge [#2509](https://github.com/ossrs/srs/pull/2514), support http hooks n_play/stop/publish/unpublish. 4.0.151
|
||||||
* v4.0, 2021-08-07, Merge [#2514](https://github.com/ossrs/srs/pull/2514), Get original client ip instead of proxy ip, for rtc api #2514. 4.0.150
|
* v4.0, 2021-08-07, Merge [#2514](https://github.com/ossrs/srs/pull/2514), Get original client ip instead of proxy ip, for rtc api #2514. 4.0.150
|
||||||
|
|
|
@ -145,7 +145,7 @@ srs_error_t SrsSessionInfo::encode(std::ostringstream& os)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SrsSessionInfo::operator=(const SrsSessionInfo& rhs)
|
bool SrsSessionInfo::operator==(const SrsSessionInfo& rhs)
|
||||||
{
|
{
|
||||||
return ice_ufrag_ == rhs.ice_ufrag_ &&
|
return ice_ufrag_ == rhs.ice_ufrag_ &&
|
||||||
ice_pwd_ == rhs.ice_pwd_ &&
|
ice_pwd_ == rhs.ice_pwd_ &&
|
||||||
|
@ -155,6 +155,16 @@ bool SrsSessionInfo::operator=(const SrsSessionInfo& rhs)
|
||||||
setup_ == rhs.setup_;
|
setup_ == rhs.setup_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SrsSessionInfo &SrsSessionInfo::operator=(SrsSessionInfo other) {
|
||||||
|
std::swap(ice_ufrag_, other.ice_ufrag_);
|
||||||
|
std::swap(ice_pwd_, other.ice_pwd_);
|
||||||
|
std::swap(ice_options_, other.ice_options_);
|
||||||
|
std::swap(fingerprint_algo_, other.fingerprint_algo_);
|
||||||
|
std::swap(fingerprint_, other.fingerprint_);
|
||||||
|
std::swap(setup_, other.setup_);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
SrsSSRCInfo::SrsSSRCInfo()
|
SrsSSRCInfo::SrsSSRCInfo()
|
||||||
{
|
{
|
||||||
ssrc_ = 0;
|
ssrc_ = 0;
|
||||||
|
|
|
@ -36,7 +36,9 @@ public:
|
||||||
srs_error_t parse_attribute(const std::string& attribute, const std::string& value);
|
srs_error_t parse_attribute(const std::string& attribute, const std::string& value);
|
||||||
srs_error_t encode(std::ostringstream& os);
|
srs_error_t encode(std::ostringstream& os);
|
||||||
|
|
||||||
bool operator=(const SrsSessionInfo& rhs);
|
bool operator==(const SrsSessionInfo& rhs);
|
||||||
|
// user-defined copy assignment (copy-and-swap idiom)
|
||||||
|
SrsSessionInfo& operator=(SrsSessionInfo other);
|
||||||
public:
|
public:
|
||||||
std::string ice_ufrag_;
|
std::string ice_ufrag_;
|
||||||
std::string ice_pwd_;
|
std::string ice_pwd_;
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 153
|
#define VERSION_REVISION 154
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue