[EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor
Created attachment 316277 [details] WIP
Created attachment 316441 [details] Patch
Comment on attachment 316441 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=316441&action=review > Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:47 > +static gboolean webKitMediaClearKeyDecryptorSetupCipher(WebKitMediaCommonEncryptionDecrypt*, GstBuffer* kidBuffer); Remove parameter name. > Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:152 > + GRefPtr<GstBuffer> keyIDBuffer(adoptGRef(gst_buffer_copy(static_cast<GstBuffer*>(g_value_get_boxed(gst_value_list_get_value(keyIDsList, i)))))); > + GRefPtr<GstBuffer> keyValueBuffer(adoptGRef(gst_buffer_copy(static_cast<GstBuffer*>(g_value_get_boxed(gst_value_list_get_value(keyValuesList, i)))))); I think, and it's funny that I said this, that it is better to use gst_value_get_buffer here to avoid the cast. I also think that you could just use GRefPtr constructor, avoid the copy and let the GRefPtr constructor ref the buffer for you instead of forcing the copy. Why would you want to copy it? Just saying, though this code works and does not leak. > Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:159 > +static gboolean webKitMediaClearKeyDecryptorSetupCipher(WebKitMediaCommonEncryptionDecrypt* self, GstBuffer* kidBuffer) I'd name it keyIDBuffer of keyIdBuffer. > Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:167 > + if (!gst_buffer_map(kidBuffer, &kidBufferMap, GST_MAP_READ)) { You need to unmap after use or we are leaking crap. > Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:263 > + GstBuffer* kidBuffer = gst_value_get_buffer(value); rename variable > Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:57 > + gboolean (*setupCipher)(WebKitMediaCommonEncryptionDecrypt*, GstBuffer* kidBuffer); Remove parameter name.
Created attachment 316446 [details] Patch
Comment on attachment 316446 [details] Patch Clearing flags on attachment: 316446 Committed r219946: <http://trac.webkit.org/changeset/219946>
All reviewed patches have been landed. Closing bug.