Changeset 231088 in webkit
- Timestamp:
- Apr 27, 2018 12:27:45 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r231084 r231088 1 2018-04-27 Yacine Bandou <yacine.bandou_ext@softathome.com> 2 3 [EME][GStreamer] Add a new message "decrypt-key-needed" send from the decryptor to the application. 4 https://bugs.webkit.org/show_bug.cgi?id=181858 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Add a new message "decrypt-key-needed" that the decryptor can send when it doesn't have an available key. 9 This message should be handled by the application in order to dispatch or send the key to the decryptor. 10 This patch is a preparation for the patch 181855. 11 With the patch 181855, the decryptor will be in the PlaybackPipeline instead of AppendPipeline, thus we can 12 get the DRM license or key before to instantiate or load the decryptor plugin in PlaybackPipeline. 13 When the decryptor plugin is instantiated or loaded, it should able to ask the application to resend 14 the DRM license or key by using this new message "decrypt-key-needed". 15 16 17 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 18 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): 19 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 20 (WebCore::MediaPlayerPrivateGStreamerBase::dispatchCDMInstance): 21 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 22 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: 23 (webkitMediaCommonEncryptionDecryptTransformInPlace): 24 1 25 2018-04-26 Justin Fan <justin_fan@apple.com> 2 26 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r230625 r231088 1246 1246 gst_structure_get(structure, "event", GST_TYPE_EVENT, &event.outPtr(), nullptr); 1247 1247 handleProtectionEvent(event.get()); 1248 } else if (gst_structure_has_name(structure, "decrypt-key-needed")) { 1249 GST_DEBUG("decrypt-key-needed message from %s", GST_MESSAGE_SRC_NAME(message)); 1250 MediaPlayerPrivateGStreamerBase::dispatchCDMInstance(); 1248 1251 } 1249 1252 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r230629 r231088 1245 1245 } 1246 1246 1247 void MediaPlayerPrivateGStreamerBase::dispatchCDMInstance() 1248 { 1249 // This function dispatches the CDMInstance in GStreamer playback pipeline. 1250 if (m_cdmInstance) 1251 m_player->attemptToDecryptWithInstance(const_cast<CDMInstance&>(*m_cdmInstance.get())); 1252 } 1253 1247 1254 void MediaPlayerPrivateGStreamerBase::handleProtectionEvent(GstEvent* event) 1248 1255 { -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
r230629 r231088 144 144 void attemptToDecryptWithLocalInstance(); 145 145 void attemptToDecryptWithInstance(CDMInstance&) override; 146 void dispatchCDMInstance(); 146 147 #endif 147 148 -
trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
r230625 r231088 198 198 return GST_FLOW_NOT_SUPPORTED; 199 199 } 200 // Send "decrypt-key-needed" message to the application in order to resend the key if it is available in the application. 201 gst_element_post_message(GST_ELEMENT(self), gst_message_new_element(GST_OBJECT(self), gst_structure_new_empty("decrypt-key-needed"))); 202 200 203 priv->condition.waitFor(priv->mutex, Seconds(5), [priv] { 201 204 return priv->keyReceived;
Note: See TracChangeset
for help on using the changeset viewer.