RESOLVED FIXED Bug 180083
[EME] Add support of multi keys from different sessions in CDMinstanceClearKey
https://bugs.webkit.org/show_bug.cgi?id=180083
Summary [EME] Add support of multi keys from different sessions in CDMinstanceClearKey
Yacine Bandou
Reported 2017-11-28 08:38:39 PST
Add support of multi keys from different MediaKeySession in CDMinstanceClearKey Use case: Two sessions of MediaKeysession, one for the audio track and one for the video track and a single CDMinstanceClearKey that receives the keys of both sessions, so it should cache these keys in a vector in order to send them to the Decryptors
Attachments
Patch (1.89 KB, patch)
2017-11-28 08:55 PST, Yacine Bandou
no flags
Patch (3.71 KB, patch)
2018-01-17 06:01 PST, Yacine Bandou
no flags
Patch (4.26 KB, patch)
2018-01-18 05:23 PST, Yacine Bandou
no flags
Yacine Bandou
Comment 1 2017-11-28 08:55:01 PST
Xabier Rodríguez Calvar
Comment 2 2017-11-29 04:42:24 PST
Comment on attachment 327753 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=327753&action=review I think in this case we would be duplicating the keys so I'd suggest checking for the keys to be inside the Vector before adding a new one. Another issue I see is that a little bit below, the vector is cleared and probably we don't want to clear the keys that are still associated with a session. I think this logic is flawed and needs more work. Maybe Žan can correct me if I am wrong. > Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:545 > + for (auto& key : keyVector) > + m_keys.append(key); If you wanted to do this, which I don't think is what I'd really want, you could use appendVector.
Yacine Bandou
Comment 3 2017-11-30 02:09:11 PST
(In reply to Xabier Rodríguez Calvar from comment #2) > Comment on attachment 327753 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=327753&action=review > > I think in this case we would be duplicating the keys so I'd suggest > checking for the keys to be inside the Vector before adding a new one. > I agree > Another issue I see is that a little bit below, the vector is cleared and > probably we don't want to clear the keys that are still associated with a > session. I think this logic is flawed and needs more work. > I'll check > Maybe Žan can correct me if I am wrong. > > > Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:545 > > + for (auto& key : keyVector) > > + m_keys.append(key); > > If you wanted to do this, which I don't think is what I'd really want, you > could use appendVector.
Yacine Bandou
Comment 4 2018-01-17 06:01:51 PST
Xabier Rodríguez Calvar
Comment 5 2018-01-17 23:47:53 PST
Comment on attachment 331486 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331486&action=review Can you explain a bit more how this works? > Source/WebCore/ChangeLog:8 > + Add support of multi keys from different MediaKeySession in CDMinstanceClearKey. CDMInstanceClearKey > Source/WebCore/ChangeLog:9 > + The single CDMinstanceClearKey that receives the keys of different sessions ditto
Yacine Bandou
Comment 6 2018-01-18 05:23:08 PST
WebKit Commit Bot
Comment 7 2018-01-23 04:07:47 PST
Comment on attachment 331614 [details] Patch Clearing flags on attachment: 331614 Committed r227409: <https://trac.webkit.org/changeset/227409>
WebKit Commit Bot
Comment 8 2018-01-23 04:07:48 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2018-01-23 04:08:30 PST
Note You need to log in before you can comment on or make changes to this bug.