Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r228316 - [EME][GStreamer] Add support for encrypted caps in GS…
…treamerUtilities https://bugs.webkit.org/show_bug.cgi?id=181990 Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-02-09 Reviewed by Xabier Rodriguez-Calvar. Add the support of encrypted caps in GStreamerUtilities. Refactor the manner that the caps are handled, such as how to extract the resolution from the video caps or how to check if the caps are encrypted. The attachTrack function in PlaybackPipeline doesn't need the "structure" parameter, it is already included in the "caps" parameter. Replace the "mediaType" parameter by the "caps" parameter in reattachTrack function, it allows to use the new functions that handle the caps in GStreamerUtilities. Tests: media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html * platform/graphics/gstreamer/GStreamerUtilities.cpp: (WebCore::getVideoSizeAndFormatFromCaps): Add the support of video encrypted caps. (WebCore::getVideoResolutionFromCaps): (WebCore::capsMediaType): (WebCore::doCapsHaveType): (WebCore::areEncryptedCaps): Add a new functions in order to handle the caps properly. * platform/graphics/gstreamer/GStreamerUtilities.h: * platform/graphics/gstreamer/mse/AppendPipeline.cpp: (WebCore::AppendPipeline::parseDemuxerSrcPadCaps): * platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp: (WebCore::GStreamerMediaDescription::codec const): (WebCore::GStreamerMediaDescription::isVideo const): (WebCore::GStreamerMediaDescription::isAudio const): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected): * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: (WebCore::PlaybackPipeline::attachTrack): (WebCore::PlaybackPipeline::reattachTrack): * platform/graphics/gstreamer/mse/PlaybackPipeline.h: * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: (webKitMediaSrcUpdatePresentationSize): Refactor some parts by using the new added functions.
- Loading branch information
1 parent
0e285df
commit 54c5b38
Showing
10 changed files
with
241 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.