Bug 204570

Summary: Simplify RealtimeOutgoingAudioSource and RealtimeOutgoingVideooSource observeSource/unobserveSource pattern
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description youenn fablet 2019-11-25 02:14:43 PST
Simplify RealtimeOutgoingAudioSource and RealtimeOutgoingVideooSource observeSource/unobserveSource pattern.
Currently, this is handled when adding/removing sinks and also when stopping libwebrtc backends.
We hit RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource() assertions as shown in tests.
Comment 1 youenn fablet 2019-11-25 04:33:51 PST
Created attachment 384289 [details]
Patch
Comment 2 youenn fablet 2019-11-25 04:34:47 PST
<rdar://problem/57458345>
Comment 3 youenn fablet 2019-11-25 07:43:02 PST
Created attachment 384297 [details]
Patch
Comment 4 youenn fablet 2019-11-25 07:44:45 PST
Created attachment 384298 [details]
Patch
Comment 5 youenn fablet 2019-12-02 07:14:17 PST
Ping review
Comment 6 Eric Carlson 2019-12-02 07:33:27 PST
Comment on attachment 384298 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        We made LibWebRTCRTCRtpSenderBackend ending the observing in its destructor.

Nit: s/ending the observing/stop observing/

> Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.cpp:49
> +#ifndef NDEBUG

"#if !ASSERT_DISABLED" might be better here.

> Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.cpp:60
> +#ifndef NDEBUG

Ditto.
Comment 7 youenn fablet 2019-12-02 07:59:48 PST
Created attachment 384622 [details]
Patch
Comment 8 WebKit Commit Bot 2019-12-02 09:26:37 PST
Comment on attachment 384622 [details]
Patch

Clearing flags on attachment: 384622

Committed r252987: <https://trac.webkit.org/changeset/252987>
Comment 9 WebKit Commit Bot 2019-12-02 09:26:38 PST
All reviewed patches have been landed.  Closing bug.