Bug 174779

Summary: [EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 174858    
Attachments:
Description Flags
WIP
none
Patch
none
Patch none

Zan Dobersek
Reported 2017-07-24 02:23:00 PDT
[EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor
Attachments
WIP (9.76 KB, patch)
2017-07-24 02:27 PDT, Zan Dobersek
no flags
Patch (10.78 KB, patch)
2017-07-26 03:35 PDT, Zan Dobersek
no flags
Patch (10.74 KB, patch)
2017-07-26 07:02 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2017-07-24 02:27:07 PDT
Zan Dobersek
Comment 2 2017-07-26 03:35:49 PDT
Xabier Rodríguez Calvar
Comment 3 2017-07-26 06:37:33 PDT
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.
Zan Dobersek
Comment 4 2017-07-26 07:02:38 PDT
Zan Dobersek
Comment 5 2017-07-26 07:33:13 PDT
Comment on attachment 316446 [details] Patch Clearing flags on attachment: 316446 Committed r219946: <http://trac.webkit.org/changeset/219946>
Zan Dobersek
Comment 6 2017-07-26 07:33:17 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.