Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1191)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc

Issue 2515163002: Don't declare function arguments of array type (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
index 84b200ccc91589ee78599b5e9d40db2ae7378e39..4188f97b539d1bfa0347b485e0d722e2d9c6074a 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
@@ -34,7 +34,7 @@ RTPPayloadRegistry::~RTPPayloadRegistry() {
}
int32_t RTPPayloadRegistry::RegisterReceivePayload(
- const char payload_name[RTP_PAYLOAD_NAME_SIZE],
+ const char* const payload_name,
const int8_t payload_type,
const uint32_t frequency,
const size_t channels,
@@ -133,7 +133,7 @@ int32_t RTPPayloadRegistry::DeRegisterReceivePayload(
// for audio codecs, but there can for video.
// Always called from within a critical section.
void RTPPayloadRegistry::DeregisterAudioCodecOrRedTypeRegardlessOfPayloadType(
- const char payload_name[RTP_PAYLOAD_NAME_SIZE],
+ const char* const payload_name,
const size_t payload_name_length,
const uint32_t frequency,
const size_t channels,
@@ -165,12 +165,11 @@ void RTPPayloadRegistry::DeregisterAudioCodecOrRedTypeRegardlessOfPayloadType(
}
}
-int32_t RTPPayloadRegistry::ReceivePayloadType(
- const char payload_name[RTP_PAYLOAD_NAME_SIZE],
- const uint32_t frequency,
- const size_t channels,
- const uint32_t rate,
- int8_t* payload_type) const {
+int32_t RTPPayloadRegistry::ReceivePayloadType(const char* const payload_name,
+ const uint32_t frequency,
+ const size_t channels,
+ const uint32_t rate,
+ int8_t* payload_type) const {
assert(payload_type);
size_t payload_name_length = strlen(payload_name);
@@ -388,12 +387,11 @@ class RTPPayloadAudioStrategy : public RTPPayloadStrategy {
payload->typeSpecific.Audio.rate = rate;
}
- RtpUtility::Payload* CreatePayloadType(
- const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- const int8_t payloadType,
- const uint32_t frequency,
- const size_t channels,
- const uint32_t rate) const override {
+ RtpUtility::Payload* CreatePayloadType(const char* const payloadName,
+ const int8_t payloadType,
+ const uint32_t frequency,
+ const size_t channels,
+ const uint32_t rate) const override {
RtpUtility::Payload* payload = new RtpUtility::Payload;
payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
@@ -425,12 +423,11 @@ class RTPPayloadVideoStrategy : public RTPPayloadStrategy {
void UpdatePayloadRate(RtpUtility::Payload* payload,
const uint32_t rate) const override {}
- RtpUtility::Payload* CreatePayloadType(
- const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- const int8_t payloadType,
- const uint32_t frequency,
- const size_t channels,
- const uint32_t rate) const override {
+ RtpUtility::Payload* CreatePayloadType(const char* const payloadName,
+ const int8_t payloadType,
+ const uint32_t frequency,
+ const size_t channels,
+ const uint32_t rate) const override {
RtpVideoCodecTypes videoType = kRtpVideoGeneric;
if (RtpUtility::StringCompare(payloadName, "VP8", 3)) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698