Bug 1523969 part 15 - Move method definition inline comments to new line in 'media/'. r=jya
authorRyan Hunt <rhunt@eqrion.net>
Mon, 25 Feb 2019 16:09:55 -0600
changeset 519778 e338646fe5515d51f46b856b5815ff9dd5af7baa
parent 519777 e0fb4657355d4d8052bff3f1e8baac265b5efef7
child 519779 53d0d3dcfe6efa01fe4f3b0877f06b69f5d4bb97
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1523969
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523969 part 15 - Move method definition inline comments to new line in 'media/'. r=jya Differential Revision: https://phabricator.services.mozilla.com/D21116
media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
media/gmp-clearkey/0.1/ClearKeyUtils.cpp
media/mtransport/transportlayerdtls.cpp
media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
media/webrtc/signaling/src/sdp/SdpHelper.cpp
media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp
media/webrtc/trunk/gtest/FakeIPC.cpp
--- a/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
@@ -45,20 +45,21 @@ class ClearKeyDecryptor : public RefCoun
   const Key& DecryptionKey() const { return mKey; }
 
  private:
   ~ClearKeyDecryptor();
 
   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();
   }
   return sInstance;
 }
 
 ClearKeyDecryptionManager::ClearKeyDecryptionManager() {
   CK_LOGD("ClearKeyDecryptionManager::ClearKeyDecryptionManager");
--- a/media/gmp-clearkey/0.1/ClearKeyUtils.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyUtils.cpp
@@ -81,19 +81,19 @@ void CK_LogArray(const char* prepend, co
 
 static void IncrementIV(vector<uint8_t>& aIV) {
   using mozilla::BigEndian;
 
   assert(aIV.size() == 16);
   BigEndian::writeUint64(&aIV[8], BigEndian::readUint64(&aIV[8]) + 1);
 }
 
-/* static */ void ClearKeyUtils::DecryptAES(const vector<uint8_t>& aKey,
-                                            vector<uint8_t>& aData,
-                                            vector<uint8_t>& aIV) {
+/* static */
+void ClearKeyUtils::DecryptAES(const vector<uint8_t>& aKey,
+                               vector<uint8_t>& aData, vector<uint8_t>& aIV) {
   assert(aIV.size() == CENC_KEY_LEN);
   assert(aKey.size() == CENC_KEY_LEN);
 
   OAES_CTX* aes = oaes_alloc();
   oaes_key_import_data(aes, &aKey[0], aKey.size());
   oaes_set_option(aes, OAES_OPTION_ECB, nullptr);
 
   for (size_t i = 0; i < aData.size(); i += CENC_KEY_LEN) {
@@ -151,19 +151,20 @@ static bool EncodeBase64Web(vector<uint8
     // out of bounds index for 'sAlphabet'
     assert(idx < MOZ_ARRAY_LENGTH(sAlphabet));
     out[i] = sAlphabet[idx];
   }
 
   return true;
 }
 
-/* static */ void ClearKeyUtils::MakeKeyRequest(const vector<KeyId>& aKeyIDs,
-                                                string& aOutRequest,
-                                                SessionType aSessionType) {
+/* static */
+void ClearKeyUtils::MakeKeyRequest(const vector<KeyId>& aKeyIDs,
+                                   string& aOutRequest,
+                                   SessionType aSessionType) {
   assert(aKeyIDs.size() && aOutRequest.empty());
 
   aOutRequest.append("{\"kids\":[");
   for (size_t i = 0; i < aKeyIDs.size(); i++) {
     if (i) {
       aOutRequest.append(",");
     }
     aOutRequest.append("\"");
@@ -395,20 +396,20 @@ static bool ParseKeys(ParserContext& aCt
     }
 
     EXPECT_SYMBOL(aCtx, ',');
   }
 
   return GetNextSymbol(aCtx) == ']';
 }
 
-/* static */ bool ClearKeyUtils::ParseJWK(const uint8_t* aKeyData,
-                                          uint32_t aKeyDataSize,
-                                          vector<KeyIdPair>& aOutKeys,
-                                          SessionType aSessionType) {
+/* static */
+bool ClearKeyUtils::ParseJWK(const uint8_t* aKeyData, uint32_t aKeyDataSize,
+                             vector<KeyIdPair>& aOutKeys,
+                             SessionType aSessionType) {
   ParserContext ctx;
   ctx.mIter = aKeyData;
   ctx.mEnd = aKeyData + aKeyDataSize;
 
   // Consume '{' from start of object.
   EXPECT_SYMBOL(ctx, '{');
 
   while (true) {
@@ -466,19 +467,20 @@ static bool ParseKeyIds(ParserContext& a
     }
 
     EXPECT_SYMBOL(aCtx, ',');
   }
 
   return GetNextSymbol(aCtx) == ']';
 }
 
-/* static */ bool ClearKeyUtils::ParseKeyIdsInitData(
-    const uint8_t* aInitData, uint32_t aInitDataSize,
-    vector<KeyId>& aOutKeyIds) {
+/* static */
+bool ClearKeyUtils::ParseKeyIdsInitData(const uint8_t* aInitData,
+                                        uint32_t aInitDataSize,
+                                        vector<KeyId>& aOutKeyIds) {
   ParserContext ctx;
   ctx.mIter = aInitData;
   ctx.mEnd = aInitData + aInitDataSize;
 
   // Consume '{' from start of object.
   EXPECT_SYMBOL(ctx, '{');
 
   while (true) {
@@ -521,18 +523,18 @@ static bool ParseKeyIds(ParserContext& a
     default: {
       // We don't support any other license types.
       assert(false);
       return "invalid";
     }
   }
 }
 
-/* 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.
     return false;
   }
   for (uint32_t i = 0; i < aLength; i++) {
     if (!isdigit(aBuff[i])) {
       return false;
--- a/media/mtransport/transportlayerdtls.cpp
+++ b/media/mtransport/transportlayerdtls.cpp
@@ -1162,19 +1162,21 @@ static SSLHandshakeType SrtpXtnServerMes
     MOZ_ASSERT(false, "Can't get version info");
     return ssl_hs_client_hello;
   }
   return (preinfo.protocolVersion >= SSL_LIBRARY_VERSION_TLS_1_3)
              ? ssl_hs_encrypted_extensions
              : 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<TransportLayerDtls *>(arg);
 
   // ClientHello: send all supported versions.
   if (message == ssl_hs_client_hello) {
     MOZ_ASSERT(self->role_ == CLIENT);
     MOZ_ASSERT(self->enabled_srtp_ciphers_.size(), "Haven't enabled SRTP");
     // We will take 2 octets for each cipher, plus a 2 octet length and 1 octet
     // for the length of the empty MKI.
@@ -1277,17 +1279,18 @@ class TlsParser {
   }
 
  private:
   const uint8_t *cursor_;
   size_t remaining_;
   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;
   static const uint8_t kTlsAlertIllegalParameter = 47;
   static const uint8_t kTlsAlertDecodeError = 50;
   static const uint8_t kTlsAlertUnsupportedExtension = 110;
 
   auto self = reinterpret_cast<TransportLayerDtls *>(arg);
--- a/media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp
@@ -3,22 +3,24 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaDataDecoderCodec.h"
 #include "WebrtcMediaDataDecoderCodec.h"
 #include "mozilla/StaticPrefs.h"
 
 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:
     case webrtc::VideoCodecType::kVideoCodecVP9:
       if (!StaticPrefs::MediaNavigatorMediadatadecoderVPXEnabled()) {
         return nullptr;
       }
       break;
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
@@ -426,17 +426,18 @@ void WebrtcGmpVideoEncoder::Encode_g(
 int32_t WebrtcGmpVideoEncoder::RegisterEncodeCompleteCallback(
     webrtc::EncodedImageCallback* aCallback) {
   MutexAutoLock lock(mCallbackMutex);
   mCallback = aCallback;
 
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
-/* static */ void WebrtcGmpVideoEncoder::ReleaseGmp_g(
+/* static */
+void WebrtcGmpVideoEncoder::ReleaseGmp_g(
     RefPtr<WebrtcGmpVideoEncoder>& aEncoder) {
   aEncoder->Close_g();
 }
 
 int32_t WebrtcGmpVideoEncoder::ReleaseGmp() {
   LOGD(("GMP Released:"));
   if (mGMPThread) {
     mGMPThread->Dispatch(WrapRunnableNM(&WebrtcGmpVideoEncoder::ReleaseGmp_g,
@@ -460,19 +461,20 @@ int32_t WebrtcGmpVideoEncoder::SetRates(
   mGMPThread->Dispatch(WrapRunnableNM(&WebrtcGmpVideoEncoder::SetRates_g,
                                       RefPtr<WebrtcGmpVideoEncoder>(this),
                                       aNewBitRate, aFrameRate),
                        NS_DISPATCH_NORMAL);
 
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
-/* static */ int32_t WebrtcGmpVideoEncoder::SetRates_g(
-    RefPtr<WebrtcGmpVideoEncoder> aThis, uint32_t aNewBitRate,
-    uint32_t aFrameRate) {
+/* static */
+int32_t WebrtcGmpVideoEncoder::SetRates_g(RefPtr<WebrtcGmpVideoEncoder> aThis,
+                                          uint32_t aNewBitRate,
+                                          uint32_t aFrameRate) {
   if (!aThis->mGMP) {
     // destroyed via Terminate()
     return WEBRTC_VIDEO_CODEC_ERROR;
   }
 
   GMPErr err = aThis->mGMP->SetRates(aNewBitRate, aFrameRate);
   if (err != GMPNoErr) {
     return WEBRTC_VIDEO_CODEC_ERROR;
@@ -658,17 +660,18 @@ int32_t WebrtcGmpVideoDecoder::InitDecod
   mGMPThread->Dispatch(WrapRunnableNM(&WebrtcGmpVideoDecoder::InitDecode_g,
                                       RefPtr<WebrtcGmpVideoDecoder>(this),
                                       aCodecSettings, aNumberOfCores, initDone),
                        NS_DISPATCH_NORMAL);
 
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
-/* static */ void WebrtcGmpVideoDecoder::InitDecode_g(
+/* static */
+void WebrtcGmpVideoDecoder::InitDecode_g(
     const RefPtr<WebrtcGmpVideoDecoder>& aThis,
     const webrtc::VideoCodec* aCodecSettings, int32_t aNumberOfCores,
     const RefPtr<GmpInitDoneRunnable>& aInitDone) {
   nsTArray<nsCString> tags;
   tags.AppendElement(NS_LITERAL_CSTRING("h264"));
   UniquePtr<GetGMPVideoDecoderCallback> callback(
       new InitDoneCallback(aThis, aInitDone));
   aThis->mInitting = true;
@@ -888,17 +891,18 @@ void WebrtcGmpVideoDecoder::Decode_g(con
 int32_t WebrtcGmpVideoDecoder::RegisterDecodeCompleteCallback(
     webrtc::DecodedImageCallback* aCallback) {
   MutexAutoLock lock(mCallbackMutex);
   mCallback = aCallback;
 
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
-/* static */ void WebrtcGmpVideoDecoder::ReleaseGmp_g(
+/* static */
+void WebrtcGmpVideoDecoder::ReleaseGmp_g(
     RefPtr<WebrtcGmpVideoDecoder>& aDecoder) {
   aDecoder->Close_g();
 }
 
 int32_t WebrtcGmpVideoDecoder::ReleaseGmp() {
   LOGD(("GMP Released:"));
   RegisterDecodeCompleteCallback(nullptr);
 
--- a/media/webrtc/signaling/src/sdp/SdpHelper.cpp
+++ b/media/webrtc/signaling/src/sdp/SdpHelper.cpp
@@ -589,18 +589,18 @@ void SdpHelper::appendSdpParseErrors(
   std::ostringstream os;
   for (auto i = aErrors.begin(); i != aErrors.end(); ++i) {
     os << "SDP Parse Error on line " << i->first << ": " + i->second
        << std::endl;
   }
   *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<size_t>(end - ptString.c_str());
   if ((pt > UINT16_MAX) || (length != ptString.size())) {
     return false;
   }
   *ptOutparam = pt;
   return true;
--- a/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp
+++ b/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp
@@ -11,17 +11,18 @@
 #include "signaling/src/sdp/SdpErrorHolder.h"
 
 extern "C" {
 #include "signaling/src/sdp/sipcc/sdp_private.h"
 }
 
 namespace mozilla {
 
-/* static */ const std::string SipccSdpAttributeList::kEmptyString = "";
+/* static */
+const std::string SipccSdpAttributeList::kEmptyString = "";
 
 SipccSdpAttributeList::SipccSdpAttributeList(
     const SipccSdpAttributeList* sessionLevel)
     : mSessionLevel(sessionLevel) {
   memset(&mAttributes, 0, sizeof(mAttributes));
 }
 
 SipccSdpAttributeList::~SipccSdpAttributeList() {
--- a/media/webrtc/trunk/gtest/FakeIPC.cpp
+++ b/media/webrtc/trunk/gtest/FakeIPC.cpp
@@ -7,19 +7,18 @@
 #ifdef WEBRTC_WIN
 #include <Windows.h>
 #else
 #include <unistd.h>
 #endif
 
 // 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
   sleep(1);
 #endif
 }
 
 namespace base {