Bug 131099

Summary: [GTK] Compile all installed resources as GResources
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, eric.carlson, glenn, gustavo, gyuyoung.kim, jer.noble, philipj, pnormand, rakuco, sergio
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 130899    
Attachments:
Description Flags
Patch pnormand: review+

Description Carlos Garcia Campos 2014-04-02 04:24:22 PDT
We currently install a few images and wav file in $prefix/share. These resources are shared between wk1 and wk2. If we compile them as gresources, we don't have to worry anymore about resources not being available because wk was not yet installed, or using hacks to make out tools find the resources. This also avoid conflicts for parallel installable versions of webkit, since the resources dir installed is not versioned.
Comment 1 Carlos Garcia Campos 2014-05-14 11:38:38 PDT
Created attachment 231460 [details]
Patch
Comment 2 Philippe Normand 2014-05-14 12:39:06 PDT
Comment on attachment 231460 [details]
Patch

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

> Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp:-42
> -    return createBusFromAudioFile(absoluteFilename.get(), false, sampleRate);

Is this function used anywhere else now? I haven't checked :)
Comment 3 Carlos Garcia Campos 2014-05-15 00:14:25 PDT
(In reply to comment #2)
> (From update of attachment 231460 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=231460&action=review
> 
> > Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp:-42
> > -    return createBusFromAudioFile(absoluteFilename.get(), false, sampleRate);
> 
> Is this function used anywhere else now? I haven't checked :)

It seems that mac also implements it (in both mac and IOS), but only EFL uses it.

platform/audio/AudioFileReader.h:PassRefPtr<AudioBus> createBusFromAudioFile(const char* filePath, bool mixToMono, float sampleRate);
platform/audio/efl/AudioBusEfl.cpp:    return createBusFromAudioFile(absoluteFilename.utf8().data(), false, sampleRate);
platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:PassRefPtr<AudioBus> createBusFromAudioFile(const char* filePath, bool mixToMono, float sampleRate)
platform/audio/ios/AudioFileReaderIOS.cpp:PassRefPtr<AudioBus> createBusFromAudioFile(const char* filePath, bool mixToMono, float sampleRate)
platform/audio/mac/AudioFileReaderMac.cpp:PassRefPtr<AudioBus> createBusFromAudioFile(const char* filePath, bool mixToMono, float sampleRate)
Comment 4 Philippe Normand 2014-05-15 00:23:51 PDT
Comment on attachment 231460 [details]
Patch

Looks good, thanks!
Comment 5 Carlos Garcia Campos 2014-05-15 01:07:10 PDT
Committed r168894: <http://trac.webkit.org/changeset/168894>