Bug 210180 - Introduce a RealtimeMediaSource observer dedicated to receiving audio samples
Summary: Introduce a RealtimeMediaSource observer dedicated to receiving audio samples
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-08 03:42 PDT by youenn fablet
Modified: 2020-04-10 03:58 PDT (History)
13 users (show)

See Also:


Attachments
Patch (64.92 KB, patch)
2020-04-08 04:09 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (68.13 KB, patch)
2020-04-08 04:55 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (68.12 KB, patch)
2020-04-09 08:25 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (68.98 KB, patch)
2020-04-09 09:24 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (69.27 KB, patch)
2020-04-09 23:49 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-04-08 03:42:17 PDT
Introduce a RealtimeMediaSource observer dedicated to receiving audio samples
Comment 1 youenn fablet 2020-04-08 04:09:30 PDT
Created attachment 395788 [details]
Patch
Comment 2 youenn fablet 2020-04-08 04:55:34 PDT
Created attachment 395792 [details]
Patch
Comment 3 EWS 2020-04-08 08:37:52 PDT
ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.
Comment 4 Eric Carlson 2020-04-08 10:11:31 PDT
Comment on attachment 395792 [details]
Patch

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

> Source/WebCore/Modules/mediarecorder/MediaRecorder.h:41
> +typedef std::unique_ptr<MediaRecorderPrivate>(*creatorFunction)(MediaStreamPrivate&);

Nit: could change to "using"

> Source/WebCore/platform/mediastream/AudioTrackPrivateMediaStream.cpp:126
> +    if (!m_shouldPlay || m_muted || streamTrack().muted() || streamTrack().ended() || !streamTrack().enabled()) {
> +        stopRenderer();
>          return;

Might as well stop the renderer when the volume is set to 0 too.

> Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h:125
> +    void audioSamplesAvailable(const MediaTime&, const PlatformAudioData&, const AudioStreamDescription&, size_t) override { };

As we discussed, it may be possible to remove this.
Comment 5 youenn fablet 2020-04-09 08:19:11 PDT
(In reply to Eric Carlson from comment #4)
> Comment on attachment 395792 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=395792&action=review
> 
> > Source/WebCore/Modules/mediarecorder/MediaRecorder.h:41
> > +typedef std::unique_ptr<MediaRecorderPrivate>(*creatorFunction)(MediaStreamPrivate&);
> 
> Nit: could change to "using"

OK.

> > Source/WebCore/platform/mediastream/AudioTrackPrivateMediaStream.cpp:126
> > +    if (!m_shouldPlay || m_muted || streamTrack().muted() || streamTrack().ended() || !streamTrack().enabled()) {
> > +        stopRenderer();
> >          return;
> 
> Might as well stop the renderer when the volume is set to 0 too.

Right, will add a call to updateRenderer ion setVolume.

> > Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h:125
> > +    void audioSamplesAvailable(const MediaTime&, const PlatformAudioData&, const AudioStreamDescription&, size_t) override { };
> 
> As we discussed, it may be possible to remove this.

OK
Comment 6 youenn fablet 2020-04-09 08:25:18 PDT
Created attachment 395953 [details]
Patch for landing
Comment 7 youenn fablet 2020-04-09 09:24:52 PDT
Created attachment 395961 [details]
Patch for landing
Comment 8 EWS 2020-04-09 12:44:27 PDT
Committed r259816: <https://trac.webkit.org/changeset/259816>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395961 [details].
Comment 9 Radar WebKit Bug Importer 2020-04-09 12:45:14 PDT
<rdar://problem/61533569>
Comment 10 Jacob Uphoff 2020-04-09 13:49:15 PDT
Reverted r259816 for reason:

This commit broke the webkit build for macOS and iOS

Committed r259824: <https://trac.webkit.org/changeset/259824>
Comment 11 youenn fablet 2020-04-09 23:49:00 PDT
Created attachment 396052 [details]
Patch for landing
Comment 12 EWS 2020-04-10 03:58:46 PDT
Committed r259861: <https://trac.webkit.org/changeset/259861>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396052 [details].