Bug 205382 - [GStreamer][EME] Notify all elements waiting for CDM attachment
Summary: [GStreamer][EME] Notify all elements waiting for CDM attachment
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Charlie Turner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-18 01:49 PST by Charlie Turner
Modified: 2019-12-19 05:25 PST (History)
14 users (show)

See Also:


Attachments
Patch (10.33 KB, patch)
2019-12-18 08:29 PST, Charlie Turner
no flags Details | Formatted Diff | Diff
Patch (7.86 KB, patch)
2019-12-19 04:29 PST, Charlie Turner
no flags Details | Formatted Diff | Diff
Patch (7.86 KB, patch)
2019-12-19 04:31 PST, Charlie Turner
no flags Details | Formatted Diff | Diff
Patch (7.87 KB, patch)
2019-12-19 04:39 PST, Charlie Turner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Turner 2019-12-18 01:49:40 PST
[GStreamer][EME] Notify all elements waiting for CDM attachment
Comment 1 Charlie Turner 2019-12-18 08:29:34 PST
Created attachment 385978 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2019-12-19 03:26:06 PST
Comment on attachment 385978 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385978&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1794
> +        auto cdmAttachmentLocker = holdLock(m_cdmAttachmentMutex);
> +        bool didCDMAttach = m_cdmAttachmentCondition.waitFor(m_cdmAttachmentMutex, 4_s, [this]() {
> +            return isCDMAttached();
> +        });
> +        cdmAttachmentLocker.unlockEarly();

I would prefer to take the boolean definition outside and open a nested scope to avoid unlocking early. I think it is less future error prone.

> Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:768
> +        else
> +            result = MediaPlayer::SupportsType::IsNotSupported;

As a personal preference I would move this upfront and avoid the else.

Anyway, this seems to be quite unrelated and I would recommend to land it in a another no-brainer bug.
Comment 3 Charlie Turner 2019-12-19 04:29:59 PST
Created attachment 386094 [details]
Patch
Comment 4 Charlie Turner 2019-12-19 04:31:09 PST
Created attachment 386095 [details]
Patch
Comment 5 WebKit Commit Bot 2019-12-19 04:35:20 PST
Comment on attachment 386095 [details]
Patch

Rejecting attachment 386095 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 386095, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: https://webkit-queues.webkit.org/results/13293302
Comment 6 Charlie Turner 2019-12-19 04:39:31 PST
Created attachment 386096 [details]
Patch
Comment 7 WebKit Commit Bot 2019-12-19 05:25:05 PST
Comment on attachment 386096 [details]
Patch

Clearing flags on attachment: 386096

Committed r253748: <https://trac.webkit.org/changeset/253748>
Comment 8 WebKit Commit Bot 2019-12-19 05:25:07 PST
All reviewed patches have been landed.  Closing bug.