From d5e3e54658f0172d1d12ff377be9d09b3d3aeb7c Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Mon, 25 Feb 2019 16:09:55 -0600 Subject: [PATCH] Bug 1523969 part 15 - Move method definition inline comments to new line in 'media/'. r=jya Differential Revision: https://phabricator.services.mozilla.com/D21116 --HG-- extra : rebase_source : bf7d4b2a09768420f8da04d82d34afed374d7961 --- .../0.1/ClearKeyDecryptionManager.cpp | 7 ++-- media/gmp-clearkey/0.1/ClearKeyUtils.cpp | 32 ++++++++++--------- media/mtransport/transportlayerdtls.cpp | 11 ++++--- .../media-conduit/MediaDataDecoderCodec.cpp | 6 ++-- .../src/media-conduit/WebrtcGmpVideoCodec.cpp | 16 ++++++---- media/webrtc/signaling/src/sdp/SdpHelper.cpp | 4 +-- .../src/sdp/SipccSdpAttributeList.cpp | 3 +- media/webrtc/trunk/gtest/FakeIPC.cpp | 5 ++- 8 files changed, 48 insertions(+), 36 deletions(-) diff --git a/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp b/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp index d7bf5dd91c15..888c567dc609 100644 --- a/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp +++ b/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp @@ -50,10 +50,11 @@ class ClearKeyDecryptor : public RefCounted { Key mKey; }; -/* static */ ClearKeyDecryptionManager* ClearKeyDecryptionManager::sInstance = - nullptr; +/* static */ +ClearKeyDecryptionManager* ClearKeyDecryptionManager::sInstance = nullptr; -/* static */ ClearKeyDecryptionManager* ClearKeyDecryptionManager::Get() { +/* static */ +ClearKeyDecryptionManager* ClearKeyDecryptionManager::Get() { if (!sInstance) { sInstance = new ClearKeyDecryptionManager(); } diff --git a/media/gmp-clearkey/0.1/ClearKeyUtils.cpp b/media/gmp-clearkey/0.1/ClearKeyUtils.cpp index 08a5e83f6d39..52474381fe6e 100644 --- a/media/gmp-clearkey/0.1/ClearKeyUtils.cpp +++ b/media/gmp-clearkey/0.1/ClearKeyUtils.cpp @@ -86,9 +86,9 @@ static void IncrementIV(vector& aIV) { BigEndian::writeUint64(&aIV[8], BigEndian::readUint64(&aIV[8]) + 1); } -/* static */ void ClearKeyUtils::DecryptAES(const vector& aKey, - vector& aData, - vector& aIV) { +/* static */ +void ClearKeyUtils::DecryptAES(const vector& aKey, + vector& aData, vector& aIV) { assert(aIV.size() == CENC_KEY_LEN); assert(aKey.size() == CENC_KEY_LEN); @@ -156,9 +156,10 @@ static bool EncodeBase64Web(vector aBinary, string& aEncoded) { return true; } -/* static */ void ClearKeyUtils::MakeKeyRequest(const vector& aKeyIDs, - string& aOutRequest, - SessionType aSessionType) { +/* static */ +void ClearKeyUtils::MakeKeyRequest(const vector& aKeyIDs, + string& aOutRequest, + SessionType aSessionType) { assert(aKeyIDs.size() && aOutRequest.empty()); aOutRequest.append("{\"kids\":["); @@ -400,10 +401,10 @@ static bool ParseKeys(ParserContext& aCtx, vector& aOutKeys) { return GetNextSymbol(aCtx) == ']'; } -/* static */ bool ClearKeyUtils::ParseJWK(const uint8_t* aKeyData, - uint32_t aKeyDataSize, - vector& aOutKeys, - SessionType aSessionType) { +/* static */ +bool ClearKeyUtils::ParseJWK(const uint8_t* aKeyData, uint32_t aKeyDataSize, + vector& aOutKeys, + SessionType aSessionType) { ParserContext ctx; ctx.mIter = aKeyData; ctx.mEnd = aKeyData + aKeyDataSize; @@ -471,9 +472,10 @@ static bool ParseKeyIds(ParserContext& aCtx, vector& aOutKeyIds) { return GetNextSymbol(aCtx) == ']'; } -/* static */ bool ClearKeyUtils::ParseKeyIdsInitData( - const uint8_t* aInitData, uint32_t aInitDataSize, - vector& aOutKeyIds) { +/* static */ +bool ClearKeyUtils::ParseKeyIdsInitData(const uint8_t* aInitData, + uint32_t aInitDataSize, + vector& aOutKeyIds) { ParserContext ctx; ctx.mIter = aInitData; ctx.mEnd = aInitData + aInitDataSize; @@ -526,8 +528,8 @@ static bool ParseKeyIds(ParserContext& aCtx, vector& aOutKeyIds) { } } -/* static */ bool ClearKeyUtils::IsValidSessionId(const char* aBuff, - uint32_t aLength) { +/* static */ +bool ClearKeyUtils::IsValidSessionId(const char* aBuff, uint32_t aLength) { if (aLength > 10) { // 10 is the max number of characters in UINT32_MAX when // represented as a string; ClearKey session ids are integers. diff --git a/media/mtransport/transportlayerdtls.cpp b/media/mtransport/transportlayerdtls.cpp index ac9a81bdc490..f8fea799caee 100644 --- a/media/mtransport/transportlayerdtls.cpp +++ b/media/mtransport/transportlayerdtls.cpp @@ -1167,9 +1167,11 @@ static SSLHandshakeType SrtpXtnServerMessage(PRFileDesc *fd) { : ssl_hs_server_hello; } -/* static */ PRBool TransportLayerDtls::WriteSrtpXtn( - PRFileDesc *fd, SSLHandshakeType message, uint8_t *data, unsigned int *len, - unsigned int max_len, void *arg) { +/* static */ +PRBool TransportLayerDtls::WriteSrtpXtn(PRFileDesc *fd, + SSLHandshakeType message, uint8_t *data, + unsigned int *len, unsigned int max_len, + void *arg) { auto self = reinterpret_cast(arg); // ClientHello: send all supported versions. @@ -1282,7 +1284,8 @@ class TlsParser { bool error_ = false; }; -/* static */ SECStatus TransportLayerDtls::HandleSrtpXtn( +/* static */ +SECStatus TransportLayerDtls::HandleSrtpXtn( PRFileDesc *fd, SSLHandshakeType message, const uint8_t *data, unsigned int len, SSLAlertDescription *alert, void *arg) { static const uint8_t kTlsAlertHandshakeFailure = 40; diff --git a/media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp b/media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp index 797ce7976bf3..d3c7b8b1ebe5 100644 --- a/media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp +++ b/media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp @@ -8,12 +8,14 @@ namespace mozilla { -/* static */ WebrtcVideoEncoder* MediaDataDecoderCodec::CreateEncoder( +/* static */ +WebrtcVideoEncoder* MediaDataDecoderCodec::CreateEncoder( webrtc::VideoCodecType aCodecType) { return nullptr; } -/* static */ WebrtcVideoDecoder* MediaDataDecoderCodec::CreateDecoder( +/* static */ +WebrtcVideoDecoder* MediaDataDecoderCodec::CreateDecoder( webrtc::VideoCodecType aCodecType) { switch (aCodecType) { case webrtc::VideoCodecType::kVideoCodecVP8: diff --git a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp index 9afa754bded2..aa3b12dcc5ba 100644 --- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp +++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp @@ -431,7 +431,8 @@ int32_t WebrtcGmpVideoEncoder::RegisterEncodeCompleteCallback( return WEBRTC_VIDEO_CODEC_OK; } -/* static */ void WebrtcGmpVideoEncoder::ReleaseGmp_g( +/* static */ +void WebrtcGmpVideoEncoder::ReleaseGmp_g( RefPtr& aEncoder) { aEncoder->Close_g(); } @@ -465,9 +466,10 @@ int32_t WebrtcGmpVideoEncoder::SetRates(uint32_t aNewBitRate, return WEBRTC_VIDEO_CODEC_OK; } -/* static */ int32_t WebrtcGmpVideoEncoder::SetRates_g( - RefPtr aThis, uint32_t aNewBitRate, - uint32_t aFrameRate) { +/* static */ +int32_t WebrtcGmpVideoEncoder::SetRates_g(RefPtr aThis, + uint32_t aNewBitRate, + uint32_t aFrameRate) { if (!aThis->mGMP) { // destroyed via Terminate() return WEBRTC_VIDEO_CODEC_ERROR; @@ -663,7 +665,8 @@ int32_t WebrtcGmpVideoDecoder::InitDecode( return WEBRTC_VIDEO_CODEC_OK; } -/* static */ void WebrtcGmpVideoDecoder::InitDecode_g( +/* static */ +void WebrtcGmpVideoDecoder::InitDecode_g( const RefPtr& aThis, const webrtc::VideoCodec* aCodecSettings, int32_t aNumberOfCores, const RefPtr& aInitDone) { @@ -893,7 +896,8 @@ int32_t WebrtcGmpVideoDecoder::RegisterDecodeCompleteCallback( return WEBRTC_VIDEO_CODEC_OK; } -/* static */ void WebrtcGmpVideoDecoder::ReleaseGmp_g( +/* static */ +void WebrtcGmpVideoDecoder::ReleaseGmp_g( RefPtr& aDecoder) { aDecoder->Close_g(); } diff --git a/media/webrtc/signaling/src/sdp/SdpHelper.cpp b/media/webrtc/signaling/src/sdp/SdpHelper.cpp index e9303c44983b..bd5e9b991d4d 100644 --- a/media/webrtc/signaling/src/sdp/SdpHelper.cpp +++ b/media/webrtc/signaling/src/sdp/SdpHelper.cpp @@ -594,8 +594,8 @@ void SdpHelper::appendSdpParseErrors( *aErrorString += os.str(); } -/* static */ bool SdpHelper::GetPtAsInt(const std::string& ptString, - uint16_t* ptOutparam) { +/* static */ +bool SdpHelper::GetPtAsInt(const std::string& ptString, uint16_t* ptOutparam) { char* end; unsigned long pt = strtoul(ptString.c_str(), &end, 10); size_t length = static_cast(end - ptString.c_str()); diff --git a/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp b/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp index 736a934ea77c..cdaedc479838 100644 --- a/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp +++ b/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp @@ -16,7 +16,8 @@ extern "C" { namespace mozilla { -/* static */ const std::string SipccSdpAttributeList::kEmptyString = ""; +/* static */ +const std::string SipccSdpAttributeList::kEmptyString = ""; SipccSdpAttributeList::SipccSdpAttributeList( const SipccSdpAttributeList* sessionLevel) diff --git a/media/webrtc/trunk/gtest/FakeIPC.cpp b/media/webrtc/trunk/gtest/FakeIPC.cpp index e0ff2773bd6c..9d7a921cafe2 100644 --- a/media/webrtc/trunk/gtest/FakeIPC.cpp +++ b/media/webrtc/trunk/gtest/FakeIPC.cpp @@ -12,9 +12,8 @@ // The implementations can't be in the .h file for some annoying reason -/* static */ void -PlatformThread:: YieldCurrentThread() -{ +/* static */ +void PlatformThread::YieldCurrentThread() { #ifdef WEBRTC_WIN Sleep(1); #else