Modernize RtpRtcp factory function: use unique_ptr as return type
to clearly signal passed ownership. Drop support for accepting nullptr clock to avoid copying the Configuration structure. Update all calls in webrtc to the new factory function Bug: None Change-Id: Ic5a78da8e59ba3988a757a9d9634fa31499ce0db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125901 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26994}
This commit is contained in:

committed by
Commit Bot

parent
ede7cb2ec1
commit
c44f6cc5fe
@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_
|
||||
#define MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@ -119,8 +120,10 @@ class RtpRtcp : public Module, public RtcpFeedbackSenderInterface {
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(Configuration);
|
||||
};
|
||||
|
||||
// Create a RTP/RTCP module object using the system clock.
|
||||
// |configuration| - Configuration of the RTP/RTCP module.
|
||||
// Creates an RTP/RTCP module object using provided |configuration|.
|
||||
static std::unique_ptr<RtpRtcp> Create(const Configuration& configuration);
|
||||
// Prefer factory function just above.
|
||||
RTC_DEPRECATED
|
||||
static RtpRtcp* CreateRtpRtcp(const RtpRtcp::Configuration& configuration);
|
||||
|
||||
// **************************************************************************
|
||||
|
Reference in New Issue
Block a user