Summary: | [GStreamer] WebAudio to MediaStream support | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||
Component: | Platform | Assignee: | Philippe Normand <pnormand> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | annulen, calvaris, eric.carlson, ews-watchlist, glenn, gyuyoung.kim, hta, jer.noble, philipj, ryuan.choi, sergio, tommyw, vjaquez, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=186933 | ||||||
Attachments: |
|
Description
Philippe Normand
2020-10-29 05:34:03 PDT
Created attachment 412638 [details]
Patch
Comment on attachment 412638 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412638&action=review > Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp:40 > + gsize size = mappedBuffer.size() / bus.numberOfChannels(); size_t > Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp:61 > + gsize size = GST_AUDIO_INFO_BPF(&info) * bus.numberOfChannels() * numberOfFrames; size_t > Source/WebCore/platform/audio/gstreamer/GStreamerAudioData.h:35 > + GStreamerAudioData(GRefPtr<GstSample>&& sample, GstAudioInfo info) GstAudioInfo&& and move into this from the caller and into m_audioInfo > Source/WebCore/platform/audio/gstreamer/GStreamerAudioData.h:49 > + GstSample* getSample() { return m_sample.get(); } > + GstAudioInfo getAudioInfo() { return m_audioInfo; } const GstAudioInfo& audioInfo() const and I would also do const GRefPrt<GstSample>& sample() const; > Source/WebCore/platform/audio/gstreamer/GStreamerAudioStreamDescription.h:33 > + GStreamerAudioStreamDescription(GstAudioInfo info) GstAudioInfo&& and move here and at the caller. Let's save some copy. > Source/WebCore/platform/audio/gstreamer/GStreamerAudioStreamDescription.h:40 > + GStreamerAudioStreamDescription(GstAudioInfo *info) > + : m_info(*info) If you do the change I recommend above, you can make this const GstAudioInfo& and m_info(info), forcing a copy. I think it is cleaner. > Source/WebCore/platform/audio/gstreamer/GStreamerAudioStreamDescription.h:97 > + GstCaps* caps() { return m_caps.get(); } > + GstAudioInfo* getInfo() { return &m_info; } const GstAudioInfo& info() const and I would also do const GRefPtr<GstCaps>& caps() const; These changes you want will likely require updates in code unrelated with this patch, so I'd rather do this in a follow-up bug. Committed r269827: <https://trac.webkit.org/changeset/269827> |