Title: [262545] trunk/Source/WebCore
Revision
262545
Author
[email protected]
Date
2020-06-04 10:33:24 -0700 (Thu, 04 Jun 2020)

Log Message

[EME][GStreamer] cdmProxyAttached does not need to force a bump ref in the signature
https://bugs.webkit.org/show_bug.cgi?id=212754

Reviewed by Philippe Normand.

cdmProxyAttached is currently receiving a RefPtr<CDMProxy> in the
signature, what causes a ref bump when the function is called. A
const RefPtr<CDMProxy>& is more suitable cause the reference is
already bumped when the CDMProxy assigned in the decryptor
attribute.

No new tests, just a rework.

* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
(cdmProxyAttached):
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (262544 => 262545)


--- trunk/Source/WebCore/ChangeLog	2020-06-04 17:15:39 UTC (rev 262544)
+++ trunk/Source/WebCore/ChangeLog	2020-06-04 17:33:24 UTC (rev 262545)
@@ -1,3 +1,22 @@
+2020-06-04  Xabier Rodriguez Calvar  <[email protected]>
+
+        [EME][GStreamer] cdmProxyAttached does not need to force a bump ref in the signature
+        https://bugs.webkit.org/show_bug.cgi?id=212754
+
+        Reviewed by Philippe Normand.
+
+        cdmProxyAttached is currently receiving a RefPtr<CDMProxy> in the
+        signature, what causes a ref bump when the function is called. A
+        const RefPtr<CDMProxy>& is more suitable cause the reference is
+        already bumped when the CDMProxy assigned in the decryptor
+        attribute.
+
+        No new tests, just a rework.
+
+        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
+        (cdmProxyAttached):
+        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
+
 2020-06-04  Tim Horton  <[email protected]>
 
         Work around broken system version macro

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp (262544 => 262545)


--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp	2020-06-04 17:15:39 UTC (rev 262544)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp	2020-06-04 17:33:24 UTC (rev 262545)
@@ -42,7 +42,7 @@
 };
 
 static void finalize(GObject*);
-static bool cdmProxyAttached(WebKitMediaCommonEncryptionDecrypt* self, RefPtr<CDMProxy>);
+static bool cdmProxyAttached(WebKitMediaCommonEncryptionDecrypt* self, const RefPtr<CDMProxy>&);
 static bool decrypt(WebKitMediaCommonEncryptionDecrypt*, GstBuffer* iv, GstBuffer* keyid, GstBuffer* sample, unsigned subSamplesCount, GstBuffer* subSamples);
 
 GST_DEBUG_CATEGORY_STATIC(webkit_media_clear_key_decrypt_debug_category);
@@ -106,7 +106,7 @@
     GST_CALL_PARENT(G_OBJECT_CLASS, finalize, (object));
 }
 
-static bool cdmProxyAttached(WebKitMediaCommonEncryptionDecrypt* self, RefPtr<CDMProxy> cdmProxy)
+static bool cdmProxyAttached(WebKitMediaCommonEncryptionDecrypt* self, const RefPtr<CDMProxy>& cdmProxy)
 {
     WebKitMediaClearKeyDecryptPrivate* priv = WEBKIT_MEDIA_CK_DECRYPT_GET_PRIVATE(WEBKIT_MEDIA_CK_DECRYPT(self));
     priv->cdmProxy = reinterpret_cast<CDMProxyClearKey*>(cdmProxy.get());

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h (262544 => 262545)


--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h	2020-06-04 17:15:39 UTC (rev 262544)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h	2020-06-04 17:33:24 UTC (rev 262545)
@@ -55,7 +55,7 @@
     GstBaseTransformClass parentClass;
 
     const char* protectionSystemId;
-    bool (*cdmProxyAttached)(WebKitMediaCommonEncryptionDecrypt*, RefPtr<WebCore::CDMProxy>);
+    bool (*cdmProxyAttached)(WebKitMediaCommonEncryptionDecrypt*, const RefPtr<WebCore::CDMProxy>&);
     bool (*decrypt)(WebKitMediaCommonEncryptionDecrypt*, GstBuffer* ivBuffer, GstBuffer* keyIDBuffer, GstBuffer* buffer, unsigned subsamplesCount, GstBuffer* subsamplesBuffer);
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to