Comment unused variables in implemented functions 7\n
Bug: webrtc:370878648 Change-Id: Id0a2c73b7055267de93d5301bd73e6212cf64794 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366261 Commit-Queue: Dor Hen <dorhen@meta.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43315}
This commit is contained in:
parent
c4024d62a4
commit
90c67e7729
@ -74,8 +74,8 @@ class FakeTaskQueueFactory : public TaskQueueFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<TaskQueueBase, TaskQueueDeleter> CreateTaskQueue(
|
std::unique_ptr<TaskQueueBase, TaskQueueDeleter> CreateTaskQueue(
|
||||||
absl::string_view name,
|
absl::string_view /* name */,
|
||||||
Priority priority) const override {
|
Priority /* priority */) const override {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ std::string IceCandidateInterface::server_url() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t SessionDescriptionInterface::RemoveCandidates(
|
size_t SessionDescriptionInterface::RemoveCandidates(
|
||||||
const std::vector<cricket::Candidate>& candidates) {
|
const std::vector<cricket::Candidate>& /* candidates */) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,8 @@ class RTC_EXPORT Metronome {
|
|||||||
// executed on the same sequence as they were requested on. There are no
|
// executed on the same sequence as they were requested on. There are no
|
||||||
// features for cancellation. When that's needed, use e.g. ScopedTaskSafety
|
// features for cancellation. When that's needed, use e.g. ScopedTaskSafety
|
||||||
// from the client.
|
// from the client.
|
||||||
virtual void RequestCallOnNextTick(absl::AnyInvocable<void() &&> callback) {}
|
virtual void RequestCallOnNextTick(
|
||||||
|
absl::AnyInvocable<void() &&> /* callback */) {}
|
||||||
|
|
||||||
// Returns the current tick period of the metronome.
|
// Returns the current tick period of the metronome.
|
||||||
virtual TimeDelta TickPeriod() const = 0;
|
virtual TimeDelta TickPeriod() const = 0;
|
||||||
|
|||||||
@ -194,7 +194,7 @@ class NetEq {
|
|||||||
// Returns 0 on success, -1 on failure.
|
// Returns 0 on success, -1 on failure.
|
||||||
virtual int InsertPacket(const RTPHeader& rtp_header,
|
virtual int InsertPacket(const RTPHeader& rtp_header,
|
||||||
rtc::ArrayView<const uint8_t> payload,
|
rtc::ArrayView<const uint8_t> payload,
|
||||||
Timestamp receive_time) {
|
Timestamp /* receive_time */) {
|
||||||
// TODO: webrtc:343501093 - Make this method pure virtual.
|
// TODO: webrtc:343501093 - Make this method pure virtual.
|
||||||
return InsertPacket(rtp_header, payload);
|
return InsertPacket(rtp_header, payload);
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ class NetEq {
|
|||||||
// such payload type was registered.
|
// such payload type was registered.
|
||||||
[[deprecated(
|
[[deprecated(
|
||||||
"Use GetCurrentDecoderFormat")]] virtual std::optional<DecoderFormat>
|
"Use GetCurrentDecoderFormat")]] virtual std::optional<DecoderFormat>
|
||||||
GetDecoderFormat(int payload_type) const {
|
GetDecoderFormat(int /* payload_type */) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -830,7 +830,7 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
|||||||
// TODO(bugs.webrtc.org/9534): Rename to RemoveTrack once the other signature
|
// TODO(bugs.webrtc.org/9534): Rename to RemoveTrack once the other signature
|
||||||
// is removed; remove default implementation once upstream is updated.
|
// is removed; remove default implementation once upstream is updated.
|
||||||
virtual RTCError RemoveTrackOrError(
|
virtual RTCError RemoveTrackOrError(
|
||||||
rtc::scoped_refptr<RtpSenderInterface> sender) {
|
rtc::scoped_refptr<RtpSenderInterface> /* sender */) {
|
||||||
RTC_CHECK_NOTREACHED();
|
RTC_CHECK_NOTREACHED();
|
||||||
return RTCError();
|
return RTCError();
|
||||||
}
|
}
|
||||||
@ -971,8 +971,8 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
|||||||
// in SDP, so it should be done before CreateOffer is called, if the
|
// in SDP, so it should be done before CreateOffer is called, if the
|
||||||
// application plans to use data channels.
|
// application plans to use data channels.
|
||||||
virtual RTCErrorOr<rtc::scoped_refptr<DataChannelInterface>>
|
virtual RTCErrorOr<rtc::scoped_refptr<DataChannelInterface>>
|
||||||
CreateDataChannelOrError(const std::string& label,
|
CreateDataChannelOrError(const std::string& /* label */,
|
||||||
const DataChannelInit* config) {
|
const DataChannelInit* /* config */) {
|
||||||
return RTCError(RTCErrorType::INTERNAL_ERROR, "dummy function called");
|
return RTCError(RTCErrorType::INTERNAL_ERROR, "dummy function called");
|
||||||
}
|
}
|
||||||
// TODO(crbug.com/788659): Remove "virtual" below and default implementation
|
// TODO(crbug.com/788659): Remove "virtual" below and default implementation
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class RTC_EXPORT RtcEventLogFactory : public RtcEventLogFactoryInterface {
|
|||||||
RtcEventLogFactory() = default;
|
RtcEventLogFactory() = default;
|
||||||
|
|
||||||
[[deprecated("Use default constructor")]] //
|
[[deprecated("Use default constructor")]] //
|
||||||
explicit RtcEventLogFactory(TaskQueueFactory* task_queue_factory) {}
|
explicit RtcEventLogFactory(TaskQueueFactory* /* task_queue_factory */) {}
|
||||||
|
|
||||||
~RtcEventLogFactory() override = default;
|
~RtcEventLogFactory() override = default;
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class RtpPacketSender {
|
|||||||
// Clear any pending packets with the given SSRC from the queue.
|
// Clear any pending packets with the given SSRC from the queue.
|
||||||
// TODO(crbug.com/1395081): Make pure virtual when downstream code has been
|
// TODO(crbug.com/1395081): Make pure virtual when downstream code has been
|
||||||
// updated.
|
// updated.
|
||||||
virtual void RemovePacketsForSsrc(uint32_t ssrc) {}
|
virtual void RemovePacketsForSsrc(uint32_t /* ssrc */) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -36,7 +36,7 @@ std::vector<RtpSource> RtpReceiverInterface::GetSources() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RtpReceiverInterface::SetFrameDecryptor(
|
void RtpReceiverInterface::SetFrameDecryptor(
|
||||||
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor) {}
|
rtc::scoped_refptr<FrameDecryptorInterface> /* frame_decryptor */) {}
|
||||||
|
|
||||||
rtc::scoped_refptr<FrameDecryptorInterface>
|
rtc::scoped_refptr<FrameDecryptorInterface>
|
||||||
RtpReceiverInterface::GetFrameDecryptor() const {
|
RtpReceiverInterface::GetFrameDecryptor() const {
|
||||||
@ -49,6 +49,6 @@ RtpReceiverInterface::dtls_transport() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RtpReceiverInterface::SetFrameTransformer(
|
void RtpReceiverInterface::SetFrameTransformer(
|
||||||
rtc::scoped_refptr<FrameTransformerInterface> frame_transformer) {}
|
rtc::scoped_refptr<FrameTransformerInterface> /* frame_transformer */) {}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -102,7 +102,7 @@ class RTC_EXPORT RtpSenderInterface : public webrtc::RefCountInterface,
|
|||||||
// for this sender.
|
// for this sender.
|
||||||
// Does not take ownership of observer.
|
// Does not take ownership of observer.
|
||||||
// Must call SetObserver(nullptr) before the observer is destroyed.
|
// Must call SetObserver(nullptr) before the observer is destroyed.
|
||||||
virtual void SetObserver(RtpSenderObserverInterface* observer) {}
|
virtual void SetObserver(RtpSenderObserverInterface* /* observer */) {}
|
||||||
|
|
||||||
// Returns null for a video sender.
|
// Returns null for a video sender.
|
||||||
virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0;
|
virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0;
|
||||||
|
|||||||
@ -56,7 +56,7 @@ void RtpTransceiverInterface::SetDirection(
|
|||||||
}
|
}
|
||||||
|
|
||||||
RTCError RtpTransceiverInterface::SetDirectionWithError(
|
RTCError RtpTransceiverInterface::SetDirectionWithError(
|
||||||
RtpTransceiverDirection new_direction) {
|
RtpTransceiverDirection /* new_direction */) {
|
||||||
RTC_DCHECK_NOTREACHED() << "Default implementation called";
|
RTC_DCHECK_NOTREACHED() << "Default implementation called";
|
||||||
return RTCError::OK();
|
return RTCError::OK();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
std::unique_ptr<TaskQueueFactory> CreateDefaultTaskQueueFactory(
|
std::unique_ptr<TaskQueueFactory> CreateDefaultTaskQueueFactory(
|
||||||
const FieldTrialsView* field_trials) {
|
const FieldTrialsView* /* field_trials */) {
|
||||||
return CreateTaskQueueGcdFactory();
|
return CreateTaskQueueGcdFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,9 +25,9 @@ FakeFrameDecryptor::FakeFrameDecryptor(uint8_t fake_key,
|
|||||||
: fake_key_(fake_key), expected_postfix_byte_(expected_postfix_byte) {}
|
: fake_key_(fake_key), expected_postfix_byte_(expected_postfix_byte) {}
|
||||||
|
|
||||||
FakeFrameDecryptor::Result FakeFrameDecryptor::Decrypt(
|
FakeFrameDecryptor::Result FakeFrameDecryptor::Decrypt(
|
||||||
cricket::MediaType media_type,
|
cricket::MediaType /* media_type */,
|
||||||
const std::vector<uint32_t>& csrcs,
|
const std::vector<uint32_t>& /* csrcs */,
|
||||||
rtc::ArrayView<const uint8_t> additional_data,
|
rtc::ArrayView<const uint8_t> /* additional_data */,
|
||||||
rtc::ArrayView<const uint8_t> encrypted_frame,
|
rtc::ArrayView<const uint8_t> encrypted_frame,
|
||||||
rtc::ArrayView<uint8_t> frame) {
|
rtc::ArrayView<uint8_t> frame) {
|
||||||
if (fail_decryption_) {
|
if (fail_decryption_) {
|
||||||
@ -47,7 +47,7 @@ FakeFrameDecryptor::Result FakeFrameDecryptor::Decrypt(
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t FakeFrameDecryptor::GetMaxPlaintextByteSize(
|
size_t FakeFrameDecryptor::GetMaxPlaintextByteSize(
|
||||||
cricket::MediaType media_type,
|
cricket::MediaType /* media_type */,
|
||||||
size_t encrypted_frame_size) {
|
size_t encrypted_frame_size) {
|
||||||
return encrypted_frame_size - 1;
|
return encrypted_frame_size - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,9 +22,10 @@ FakeFrameEncryptor::FakeFrameEncryptor(uint8_t fake_key, uint8_t postfix_byte)
|
|||||||
: fake_key_(fake_key), postfix_byte_(postfix_byte) {}
|
: fake_key_(fake_key), postfix_byte_(postfix_byte) {}
|
||||||
|
|
||||||
// FrameEncryptorInterface implementation
|
// FrameEncryptorInterface implementation
|
||||||
int FakeFrameEncryptor::Encrypt(cricket::MediaType media_type,
|
int FakeFrameEncryptor::Encrypt(
|
||||||
uint32_t ssrc,
|
cricket::MediaType /* media_type */,
|
||||||
rtc::ArrayView<const uint8_t> additional_data,
|
uint32_t /* ssrc */,
|
||||||
|
rtc::ArrayView<const uint8_t> /* additional_data */,
|
||||||
rtc::ArrayView<const uint8_t> frame,
|
rtc::ArrayView<const uint8_t> frame,
|
||||||
rtc::ArrayView<uint8_t> encrypted_frame,
|
rtc::ArrayView<uint8_t> encrypted_frame,
|
||||||
size_t* bytes_written) {
|
size_t* bytes_written) {
|
||||||
@ -43,7 +44,7 @@ int FakeFrameEncryptor::Encrypt(cricket::MediaType media_type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t FakeFrameEncryptor::GetMaxCiphertextByteSize(
|
size_t FakeFrameEncryptor::GetMaxCiphertextByteSize(
|
||||||
cricket::MediaType media_type,
|
cricket::MediaType /* media_type */,
|
||||||
size_t frame_size) {
|
size_t frame_size) {
|
||||||
return frame_size + 1;
|
return frame_size + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ struct TestVideoFrameWriter : public test::VideoFrameWriter {
|
|||||||
const VideoResolution& resolution)
|
const VideoResolution& resolution)
|
||||||
: file_name_prefix(file_name_prefix), resolution(resolution) {}
|
: file_name_prefix(file_name_prefix), resolution(resolution) {}
|
||||||
|
|
||||||
bool WriteFrame(const VideoFrame& frame) override { return true; }
|
bool WriteFrame(const VideoFrame& /* frame */) override { return true; }
|
||||||
|
|
||||||
void Close() override {}
|
void Close() override {}
|
||||||
|
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class NetworkBehaviorInterface {
|
|||||||
// DequeueDeliverablePackets call when network parameters (such as link
|
// DequeueDeliverablePackets call when network parameters (such as link
|
||||||
// capacity) changes.
|
// capacity) changes.
|
||||||
virtual void RegisterDeliveryTimeChangedCallback(
|
virtual void RegisterDeliveryTimeChangedCallback(
|
||||||
absl::AnyInvocable<void()> callback) {}
|
absl::AnyInvocable<void()> /* callback */) {}
|
||||||
virtual ~NetworkBehaviorInterface() = default;
|
virtual ~NetworkBehaviorInterface() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class TestVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
|||||||
bool is_screencast() const override { return false; }
|
bool is_screencast() const override { return false; }
|
||||||
std::optional<bool> needs_denoising() const override { return std::nullopt; }
|
std::optional<bool> needs_denoising() const override { return std::nullopt; }
|
||||||
|
|
||||||
bool GetStats(Stats* stats) override { return false; }
|
bool GetStats(Stats* /* stats */) override { return false; }
|
||||||
|
|
||||||
void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
|
void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
|
||||||
const rtc::VideoSinkWants& wants) override;
|
const rtc::VideoSinkWants& wants) override;
|
||||||
@ -52,9 +52,9 @@ class TestVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
|||||||
bool SupportsEncodedOutput() const override { return false; }
|
bool SupportsEncodedOutput() const override { return false; }
|
||||||
void GenerateKeyFrame() override {}
|
void GenerateKeyFrame() override {}
|
||||||
void AddEncodedSink(
|
void AddEncodedSink(
|
||||||
rtc::VideoSinkInterface<RecordableEncodedFrame>* sink) override {}
|
rtc::VideoSinkInterface<RecordableEncodedFrame>* /* sink */) override {}
|
||||||
void RemoveEncodedSink(
|
void RemoveEncodedSink(
|
||||||
rtc::VideoSinkInterface<RecordableEncodedFrame>* sink) override {}
|
rtc::VideoSinkInterface<RecordableEncodedFrame>* /* sink */) override {}
|
||||||
|
|
||||||
// Starts producing video.
|
// Starts producing video.
|
||||||
virtual void Start() = 0;
|
virtual void Start() = 0;
|
||||||
@ -65,14 +65,14 @@ class TestVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
|||||||
virtual void SetScreencast(bool is_screencast) = 0;
|
virtual void SetScreencast(bool is_screencast) = 0;
|
||||||
|
|
||||||
// TODO(titovartem): make next 4 methods pure virtual.
|
// TODO(titovartem): make next 4 methods pure virtual.
|
||||||
virtual void SetEnableAdaptation(bool enable_adaptation) {}
|
virtual void SetEnableAdaptation(bool /* enable_adaptation */) {}
|
||||||
|
|
||||||
virtual int GetFrameWidth() const { return 0; }
|
virtual int GetFrameWidth() const { return 0; }
|
||||||
virtual int GetFrameHeight() const { return 0; }
|
virtual int GetFrameHeight() const { return 0; }
|
||||||
|
|
||||||
virtual void OnOutputFormatRequest(int width,
|
virtual void OnOutputFormatRequest(int /* width */,
|
||||||
int height,
|
int /* height */,
|
||||||
const std::optional<int>& max_fps) {}
|
const std::optional<int>& /* max_fps */) {}
|
||||||
|
|
||||||
// Returns stream label for this video source if present. Implementations
|
// Returns stream label for this video source if present. Implementations
|
||||||
// may override this method to increase debugability and testability.
|
// may override this method to increase debugability and testability.
|
||||||
|
|||||||
@ -87,9 +87,9 @@ class VideoQualityAnalyzerInterface
|
|||||||
// calculations. Analyzer can perform simple calculations on the calling
|
// calculations. Analyzer can perform simple calculations on the calling
|
||||||
// thread in each method, but should remember, that it is the same thread,
|
// thread in each method, but should remember, that it is the same thread,
|
||||||
// that is used in video pipeline.
|
// that is used in video pipeline.
|
||||||
virtual void Start(std::string test_case_name,
|
virtual void Start(std::string /* test_case_name */,
|
||||||
rtc::ArrayView<const std::string> peer_names,
|
rtc::ArrayView<const std::string> /* peer_names */,
|
||||||
int max_threads_count) {}
|
int /* max_threads_count */) {}
|
||||||
|
|
||||||
// Will be called when frame was generated from the input stream.
|
// Will be called when frame was generated from the input stream.
|
||||||
// `peer_name` is name of the peer on which side frame was captured.
|
// `peer_name` is name of the peer on which side frame was captured.
|
||||||
@ -99,34 +99,34 @@ class VideoQualityAnalyzerInterface
|
|||||||
const VideoFrame& frame) = 0;
|
const VideoFrame& frame) = 0;
|
||||||
// Will be called before calling the encoder.
|
// Will be called before calling the encoder.
|
||||||
// `peer_name` is name of the peer on which side frame came to encoder.
|
// `peer_name` is name of the peer on which side frame came to encoder.
|
||||||
virtual void OnFramePreEncode(absl::string_view peer_name,
|
virtual void OnFramePreEncode(absl::string_view /* peer_name */,
|
||||||
const VideoFrame& frame) {}
|
const VideoFrame& /* frame */) {}
|
||||||
// Will be called for each EncodedImage received from encoder. Single
|
// Will be called for each EncodedImage received from encoder. Single
|
||||||
// VideoFrame can produce multiple EncodedImages. Each encoded image will
|
// VideoFrame can produce multiple EncodedImages. Each encoded image will
|
||||||
// have id from VideoFrame.
|
// have id from VideoFrame.
|
||||||
// `peer_name` is name of the peer on which side frame was encoded.
|
// `peer_name` is name of the peer on which side frame was encoded.
|
||||||
virtual void OnFrameEncoded(absl::string_view peer_name,
|
virtual void OnFrameEncoded(absl::string_view /* peer_name */,
|
||||||
uint16_t frame_id,
|
uint16_t /* frame_id */,
|
||||||
const EncodedImage& encoded_image,
|
const EncodedImage& /* encoded_image */,
|
||||||
const EncoderStats& stats,
|
const EncoderStats& /* stats */,
|
||||||
bool discarded) {}
|
bool /* discarded */) {}
|
||||||
// Will be called for each frame dropped by encoder.
|
// Will be called for each frame dropped by encoder.
|
||||||
// `peer_name` is name of the peer on which side frame drop was detected.
|
// `peer_name` is name of the peer on which side frame drop was detected.
|
||||||
virtual void OnFrameDropped(absl::string_view peer_name,
|
virtual void OnFrameDropped(absl::string_view /* peer_name */,
|
||||||
EncodedImageCallback::DropReason reason) {}
|
EncodedImageCallback::DropReason /* reason */) {}
|
||||||
// Will be called before calling the decoder.
|
// Will be called before calling the decoder.
|
||||||
// `peer_name` is name of the peer on which side frame was received.
|
// `peer_name` is name of the peer on which side frame was received.
|
||||||
virtual void OnFramePreDecode(absl::string_view peer_name,
|
virtual void OnFramePreDecode(absl::string_view /* peer_name */,
|
||||||
uint16_t frame_id,
|
uint16_t /* frame_id */,
|
||||||
const EncodedImage& encoded_image) {}
|
const EncodedImage& /* encoded_image */) {}
|
||||||
// Will be called after decoding the frame.
|
// Will be called after decoding the frame.
|
||||||
// `peer_name` is name of the peer on which side frame was decoded.
|
// `peer_name` is name of the peer on which side frame was decoded.
|
||||||
virtual void OnFrameDecoded(absl::string_view peer_name,
|
virtual void OnFrameDecoded(absl::string_view /* peer_name */,
|
||||||
const VideoFrame& frame,
|
const VideoFrame& /* frame */,
|
||||||
const DecoderStats& stats) {}
|
const DecoderStats& /* stats */) {}
|
||||||
// Will be called when frame will be obtained from PeerConnection stack.
|
// Will be called when frame will be obtained from PeerConnection stack.
|
||||||
// `peer_name` is name of the peer on which side frame was rendered.
|
// `peer_name` is name of the peer on which side frame was rendered.
|
||||||
virtual void OnFrameRendered(absl::string_view peer_name,
|
virtual void OnFrameRendered(absl::string_view /* peer_name */,
|
||||||
const VideoFrame& frame) {}
|
const VideoFrame& frame) {}
|
||||||
// Will be called if encoder return not WEBRTC_VIDEO_CODEC_OK.
|
// Will be called if encoder return not WEBRTC_VIDEO_CODEC_OK.
|
||||||
// All available codes are listed in
|
// All available codes are listed in
|
||||||
|
|||||||
@ -1610,13 +1610,14 @@ TEST_F(StunTest, EqualAttributes) {
|
|||||||
auto copy = msg.Clone();
|
auto copy = msg.Clone();
|
||||||
ASSERT_NE(nullptr, copy.get());
|
ASSERT_NE(nullptr, copy.get());
|
||||||
|
|
||||||
EXPECT_TRUE(copy->EqualAttributes(&msg, [](int type) { return true; }));
|
EXPECT_TRUE(copy->EqualAttributes(&msg, [](int /* type */) { return true; }));
|
||||||
|
|
||||||
{
|
{
|
||||||
auto attr = StunAttribute::CreateByteString(STUN_ATTR_NONCE);
|
auto attr = StunAttribute::CreateByteString(STUN_ATTR_NONCE);
|
||||||
attr->CopyBytes("keso");
|
attr->CopyBytes("keso");
|
||||||
msg.AddAttribute(std::move(attr));
|
msg.AddAttribute(std::move(attr));
|
||||||
EXPECT_FALSE(copy->EqualAttributes(&msg, [](int type) { return true; }));
|
EXPECT_FALSE(
|
||||||
|
copy->EqualAttributes(&msg, [](int /* type */) { return true; }));
|
||||||
EXPECT_TRUE(copy->EqualAttributes(
|
EXPECT_TRUE(copy->EqualAttributes(
|
||||||
&msg, [](int type) { return type != STUN_ATTR_NONCE; }));
|
&msg, [](int type) { return type != STUN_ATTR_NONCE; }));
|
||||||
}
|
}
|
||||||
@ -1625,21 +1626,24 @@ TEST_F(StunTest, EqualAttributes) {
|
|||||||
auto attr = StunAttribute::CreateByteString(STUN_ATTR_NONCE);
|
auto attr = StunAttribute::CreateByteString(STUN_ATTR_NONCE);
|
||||||
attr->CopyBytes("keso");
|
attr->CopyBytes("keso");
|
||||||
copy->AddAttribute(std::move(attr));
|
copy->AddAttribute(std::move(attr));
|
||||||
EXPECT_TRUE(copy->EqualAttributes(&msg, [](int type) { return true; }));
|
EXPECT_TRUE(
|
||||||
|
copy->EqualAttributes(&msg, [](int /* type */) { return true; }));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
copy->RemoveAttribute(STUN_ATTR_NONCE);
|
copy->RemoveAttribute(STUN_ATTR_NONCE);
|
||||||
auto attr = StunAttribute::CreateByteString(STUN_ATTR_NONCE);
|
auto attr = StunAttribute::CreateByteString(STUN_ATTR_NONCE);
|
||||||
attr->CopyBytes("kent");
|
attr->CopyBytes("kent");
|
||||||
copy->AddAttribute(std::move(attr));
|
copy->AddAttribute(std::move(attr));
|
||||||
EXPECT_FALSE(copy->EqualAttributes(&msg, [](int type) { return true; }));
|
EXPECT_FALSE(
|
||||||
|
copy->EqualAttributes(&msg, [](int /* type */) { return true; }));
|
||||||
EXPECT_TRUE(copy->EqualAttributes(
|
EXPECT_TRUE(copy->EqualAttributes(
|
||||||
&msg, [](int type) { return type != STUN_ATTR_NONCE; }));
|
&msg, [](int type) { return type != STUN_ATTR_NONCE; }));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
msg.RemoveAttribute(STUN_ATTR_NONCE);
|
msg.RemoveAttribute(STUN_ATTR_NONCE);
|
||||||
EXPECT_FALSE(copy->EqualAttributes(&msg, [](int type) { return true; }));
|
EXPECT_FALSE(
|
||||||
|
copy->EqualAttributes(&msg, [](int /* type */) { return true; }));
|
||||||
EXPECT_TRUE(copy->EqualAttributes(
|
EXPECT_TRUE(copy->EqualAttributes(
|
||||||
&msg, [](int type) { return type != STUN_ATTR_NONCE; }));
|
&msg, [](int type) { return type != STUN_ATTR_NONCE; }));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -269,8 +269,8 @@ ThreadTilesAndSuperblockSizeInfo GetThreadingTilesAndSuperblockSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ValidateEncodeParams(
|
bool ValidateEncodeParams(
|
||||||
const webrtc::VideoFrameBuffer& frame_buffer,
|
const webrtc::VideoFrameBuffer& /* frame_buffer */,
|
||||||
const VideoEncoderInterface::TemporalUnitSettings& tu_settings,
|
const VideoEncoderInterface::TemporalUnitSettings& /* tu_settings */,
|
||||||
const std::vector<VideoEncoderInterface::FrameEncodeSettings>&
|
const std::vector<VideoEncoderInterface::FrameEncodeSettings>&
|
||||||
frame_settings,
|
frame_settings,
|
||||||
const std::array<std::optional<Resolution>, 8>& last_resolution_in_buffer,
|
const std::array<std::optional<Resolution>, 8>& last_resolution_in_buffer,
|
||||||
|
|||||||
@ -131,7 +131,7 @@ class FrameEncoderSettingsBuilder {
|
|||||||
unread_.resize(size.bytes());
|
unread_.resize(size.bytes());
|
||||||
return unread_;
|
return unread_;
|
||||||
}
|
}
|
||||||
void EncodeComplete(const EncodeResult& encode_result) override {}
|
void EncodeComplete(const EncodeResult& /* encode_result */) override {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<uint8_t> unread_;
|
std::vector<uint8_t> unread_;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ struct FooDecoderTemplateAdapter {
|
|||||||
static std::vector<SdpVideoFormat> SupportedFormats() { return {kFooSdp}; }
|
static std::vector<SdpVideoFormat> SupportedFormats() { return {kFooSdp}; }
|
||||||
|
|
||||||
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
auto decoder = std::make_unique<testing::StrictMock<MockVideoDecoder>>();
|
auto decoder = std::make_unique<testing::StrictMock<MockVideoDecoder>>();
|
||||||
EXPECT_CALL(*decoder, Destruct);
|
EXPECT_CALL(*decoder, Destruct);
|
||||||
return decoder;
|
return decoder;
|
||||||
@ -56,8 +56,8 @@ struct BarDecoderTemplateAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
||||||
const Environment& env,
|
const Environment& /* env */,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
auto decoder = std::make_unique<testing::StrictMock<MockVideoDecoder>>();
|
auto decoder = std::make_unique<testing::StrictMock<MockVideoDecoder>>();
|
||||||
EXPECT_CALL(*decoder, Destruct);
|
EXPECT_CALL(*decoder, Destruct);
|
||||||
return decoder;
|
return decoder;
|
||||||
|
|||||||
@ -46,13 +46,13 @@ class VideoDecoderSoftwareFallbackWrapperTest : public ::testing::Test {
|
|||||||
|
|
||||||
class CountingFakeDecoder : public VideoDecoder {
|
class CountingFakeDecoder : public VideoDecoder {
|
||||||
public:
|
public:
|
||||||
bool Configure(const Settings& settings) override {
|
bool Configure(const Settings& /* settings */) override {
|
||||||
++configure_count_;
|
++configure_count_;
|
||||||
return configure_return_value_;
|
return configure_return_value_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Decode(const EncodedImage& input_image,
|
int32_t Decode(const EncodedImage& /* input_image */,
|
||||||
int64_t render_time_ms) override {
|
int64_t /* render_time_ms */) override {
|
||||||
++decode_count_;
|
++decode_count_;
|
||||||
return decode_return_code_;
|
return decode_return_code_;
|
||||||
}
|
}
|
||||||
@ -183,15 +183,15 @@ TEST_F(VideoDecoderSoftwareFallbackWrapperTest, ForwardsReleaseCall) {
|
|||||||
TEST_F(VideoDecoderSoftwareFallbackWrapperTest,
|
TEST_F(VideoDecoderSoftwareFallbackWrapperTest,
|
||||||
ForwardsRegisterDecodeCompleteCallback) {
|
ForwardsRegisterDecodeCompleteCallback) {
|
||||||
class FakeDecodedImageCallback : public DecodedImageCallback {
|
class FakeDecodedImageCallback : public DecodedImageCallback {
|
||||||
int32_t Decoded(VideoFrame& decodedImage) override { return 0; }
|
int32_t Decoded(VideoFrame& /* decodedImage */) override { return 0; }
|
||||||
int32_t Decoded(webrtc::VideoFrame& decodedImage,
|
int32_t Decoded(webrtc::VideoFrame& /* decodedImage */,
|
||||||
int64_t decode_time_ms) override {
|
int64_t /* decode_time_ms */) override {
|
||||||
RTC_DCHECK_NOTREACHED();
|
RTC_DCHECK_NOTREACHED();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
void Decoded(webrtc::VideoFrame& decodedImage,
|
void Decoded(webrtc::VideoFrame& /* decodedImage */,
|
||||||
std::optional<int32_t> decode_time_ms,
|
std::optional<int32_t> /* decode_time_ms */,
|
||||||
std::optional<uint8_t> qp) override {
|
std::optional<uint8_t> /* qp */) override {
|
||||||
RTC_DCHECK_NOTREACHED();
|
RTC_DCHECK_NOTREACHED();
|
||||||
}
|
}
|
||||||
} callback;
|
} callback;
|
||||||
|
|||||||
@ -50,8 +50,8 @@ struct FooEncoderTemplateAdapter {
|
|||||||
static std::vector<SdpVideoFormat> SupportedFormats() { return {kFooSdp}; }
|
static std::vector<SdpVideoFormat> SupportedFormats() { return {kFooSdp}; }
|
||||||
|
|
||||||
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
||||||
const Environment& env,
|
const Environment& /* env */,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return std::make_unique<StrictMock<MockVideoEncoder>>();
|
return std::make_unique<StrictMock<MockVideoEncoder>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ struct BarEncoderTemplateAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
||||||
const Environment& env,
|
const Environment& /* env */,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& format) {
|
||||||
return std::make_unique<StrictMock<MockVideoEncoder>>();
|
return std::make_unique<StrictMock<MockVideoEncoder>>();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user