WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
186933
[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs
https://bugs.webkit.org/show_bug.cgi?id=186933
Summary
[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaS...
Thibault Saunier
Reported
2018-06-22 10:56:19 PDT
This is also required for many WebRTC LayoutTests.
Attachments
Patch
(30.79 KB, patch)
2018-12-06 07:34 PST
,
Thibault Saunier
no flags
Details
Formatted Diff
Diff
Patch
(31.54 KB, patch)
2018-12-06 09:36 PST
,
Thibault Saunier
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Thibault Saunier
Comment 1
2018-12-06 07:34:52 PST
Created
attachment 356726
[details]
Patch
Philippe Normand
Comment 2
2018-12-06 08:28:03 PST
Comment on
attachment 356726
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=356726&action=review
> Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:138 > + if (m_pipeline) > + gst_element_set_state(m_pipeline.get(), GST_STATE_NULL);
Needs ifdef guards
> Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:241 > + if (m_pipeline) > + gst_element_set_state(m_pipeline.get(), GST_STATE_PLAYING);
Ditto
> Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:45 > GstElement* source = GStreamerCapturer::createSource();
No need for this variable anymore
> Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:40 > +static const double Tau = 2 * M_PI; > +static const double BipBopDuration = 0.07; > +static const double BipBopVolume = 0.5; > +static const double BipFrequency = 1500; > +static const double BopFrequency = 500; > +static const double HumFrequency = 150; > +static const double HumVolume = 0.1;
I think we usually name static constants like s_fooBar :)
> Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:119 > + addHum(BipBopVolume, BopFrequency, rate, 0, static_cast<float*>(m_bipBopBuffer.data() + bopStart), bipBopSampleCount);
shouldn't the 0 here be bopStart?
Thibault Saunier
Comment 3
2018-12-06 09:36:14 PST
Created
attachment 356735
[details]
Patch
Thibault Saunier
Comment 4
2018-12-06 09:52:24 PST
(In reply to Philippe Normand from
comment #2
)
> Comment on
attachment 356726
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=356726&action=review
> > > Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:138 > > + if (m_pipeline) > > + gst_element_set_state(m_pipeline.get(), GST_STATE_NULL); > > Needs ifdef guards > > > Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:241 > > + if (m_pipeline) > > + gst_element_set_state(m_pipeline.get(), GST_STATE_PLAYING); > > Ditto
I am just gonna remove the ifdefing of the varible, it won't be used in some cases but to me it is better than ifdefing all around.
> > Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:45 > > GstElement* source = GStreamerCapturer::createSource(); > > No need for this variable anymore
The whole override is not needed anymore, removed :-)
> > Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:40 > > +static const double Tau = 2 * M_PI; > > +static const double BipBopDuration = 0.07; > > +static const double BipBopVolume = 0.5; > > +static const double BipFrequency = 1500; > > +static const double BopFrequency = 500; > > +static const double HumFrequency = 150; > > +static const double HumVolume = 0.1; > > I think we usually name static constants like s_fooBar :)
Done.
> > Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:119 > > + addHum(BipBopVolume, BopFrequency, rate, 0, static_cast<float*>(m_bipBopBuffer.data() + bopStart), bipBopSampleCount); > > shouldn't the 0 here be bopStart?
Nop, we already offset the data.
Philippe Normand
Comment 5
2018-12-07 01:37:26 PST
So the start param of addHum() is basically useless then?
Thibault Saunier
Comment 6
2018-12-07 02:10:15 PST
(In reply to Philippe Normand from
comment #5
)
> So the start param of addHum() is basically useless then?
....
> Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:85 > + addHum(s_HumVolume, s_HumFrequency, sampleRate(), m_samplesRendered, (float*)map.data(), bipBopCount);
It is used here.
Philippe Normand
Comment 7
2018-12-07 02:14:05 PST
Comment on
attachment 356735
[details]
Patch OK then!
WebKit Commit Bot
Comment 8
2018-12-07 02:49:04 PST
Comment on
attachment 356735
[details]
Patch Clearing flags on attachment: 356735 Committed
r238951
: <
https://trac.webkit.org/changeset/238951
>
WebKit Commit Bot
Comment 9
2018-12-07 02:49:05 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10
2018-12-07 02:50:41 PST
<
rdar://problem/46550463
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug