Summary: | [GStreamer] Multi-channel (>2) support for the AudioFileReader | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Lauro Moura <lmoura> | ||||||||
Component: | Web Audio | Assignee: | Philippe Normand <pnormand> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bugs-noreply, calvaris, eric.carlson, ews-watchlist, glenn, jer.noble, peng.liu6, philipj, pnormand, sergio, vjaquez, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Lauro Moura
2020-08-06 22:23:40 PDT
Created attachment 412296 [details]
Patch
Comment on attachment 412296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412296&action=review > Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:210 > + auto result = m_buffers.ensure(channelId, [&] { > + return gst_buffer_list_new(); > + }); The way you use it, how is it bumping the reference if you switch it to a smart ptr? Comment on attachment 412296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412296&action=review >> Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:210 >> + }); > > The way you use it, how is it bumping the reference if you switch it to a smart ptr? I tried already storing GRefPtrs in the hashtable. They endup with a refcount of 2, I think one from the hashtable storage and an extra one when getting existing elements from it. Comment on attachment 412296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412296&action=review > Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:204 > + int frames = gst_buffer_get_size(buffer) / info.bpf; Nit. Looks like the local variable "frames" is not needed. Comment on attachment 412296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412296&action=review >> Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:204 >> + int frames = gst_buffer_get_size(buffer) / info.bpf; > > Nit. Looks like the local variable "frames" is not needed. 👍 Created attachment 412404 [details]
Patch
Created attachment 412528 [details]
Patch
Comment on attachment 412528 [details]
Patch
Good to go!
Committed r269104: <https://trac.webkit.org/changeset/269104> |