Bug 78688 - [EFL] Implement Web Audio API.
Summary: [EFL] Implement Web Audio API.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-15 03:30 PST by Dongwoo Joshua Im (dwim)
Modified: 2012-05-20 20:26 PDT (History)
14 users (show)

See Also:


Attachments
Patch (21.32 KB, patch)
2012-03-22 22:07 PDT, Dongwoo Joshua Im (dwim)
no flags Details | Formatted Diff | Diff
Patch (21.68 KB, patch)
2012-03-29 01:10 PDT, Dongwoo Joshua Im (dwim)
pnormand: review-
pnormand: commit-queue-
Details | Formatted Diff | Diff
Patch (23.51 KB, patch)
2012-04-25 01:10 PDT, Dongwoo Joshua Im (dwim)
pnormand: review-
pnormand: commit-queue-
Details | Formatted Diff | Diff
Patch (23.72 KB, patch)
2012-05-01 22:07 PDT, Dongwoo Joshua Im (dwim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongwoo Joshua Im (dwim) 2012-02-15 03:30:16 PST
Implement Web Audio API on EFL port.
(https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html)

I'm implementing this patch now.
I'll upload my first patch in a week.
Comment 1 Dongwoo Joshua Im (dwim) 2012-03-22 22:07:39 PDT
Created attachment 133428 [details]
Patch

This is the first patch of the Web Audio API on EFL port.
Comment 2 Philippe Normand 2012-03-23 06:50:13 PDT
Comment on attachment 133428 [details]
Patch

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

> LayoutTests/platform/efl/Skipped:-1074
> -# The EFL port has no support for webaudio
> -webaudio

You got all the tests running? I'm a bit surprised.

> Source/WebKit/efl/ewk/ewk_view.cpp:202
> +#if ENABLE(WEB_AUDIO)
> +        bool webAudio : 1;
> +#endif

Does that mean the feature is enabled by default? If so, I don't recommend this... WebAudio is still quite experimental.
Comment 3 Peter Beverloo 2012-03-23 07:21:16 PDT
Keep in mind that the Web Audio API implementation moved to Source/WebCore/Modules/webaudio/ a few days ago: http://wkrev.com/111474. This patch won't apply as it still refers some old paths.
Comment 4 Dongwoo Joshua Im (dwim) 2012-03-26 01:44:57 PDT
(In reply to comment #3)
> Keep in mind that the Web Audio API implementation moved to Source/WebCore/Modules/webaudio/ a few days ago: http://wkrev.com/111474. This patch won't apply as it still refers some old paths.

Oh. I can see the changes now. I will fix the patch.
Comment 5 Dongwoo Joshua Im (dwim) 2012-03-28 22:37:16 PDT
(In reply to comment #2)
> (From update of attachment 133428 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=133428&action=review
> 
> > LayoutTests/platform/efl/Skipped:-1074
> > -# The EFL port has no support for webaudio
> > -webaudio
> 
> You got all the tests running? I'm a bit surprised.
> 

Not all...
I remove webaudio directory from this file because we "need" to pass this test suites.
I will add the failed cases in the Skipped file.

How about GTK port? How many test are failed currently?



> > Source/WebKit/efl/ewk/ewk_view.cpp:202
> > +#if ENABLE(WEB_AUDIO)
> > +        bool webAudio : 1;
> > +#endif
> 
> Does that mean the feature is enabled by default? If so, I don't recommend this... WebAudio is still quite experimental.

Uhm.. ok. I agree with you. I will disable webaudio by default.
Comment 6 Dongwoo Joshua Im (dwim) 2012-03-29 01:10:59 PDT
Created attachment 134520 [details]
Patch

I fixed the patch regarding the comments.
Comment 7 Philippe Normand 2012-04-19 16:06:52 PDT
Comment on attachment 134520 [details]
Patch

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

Looks good apart from the following one:

> Source/WebCore/PlatformEfl.cmake:288
> +    platform/graphics/gstreamer/GRefPtrGStreamer.cpp

That's used by both VIDEO and WEB_AUDIO. Maybe it's in the wrong section of the file?
Comment 8 Dongwoo Joshua Im (dwim) 2012-04-25 01:10:52 PDT
Created attachment 138755 [details]
Patch

I've fixed the patch regarding Philippe's comment.
Comment 9 Philippe Normand 2012-04-26 08:03:20 PDT
Comment on attachment 138755 [details]
Patch

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

I think a new iteration of this patch would be needed. Looks good though.

> Source/WebCore/PlatformEfl.cmake:223
>      ${GStreamer-Video_INCLUDE_DIRS}

That's only needed for VIDEO.

> Source/WebCore/PlatformEfl.cmake:232
> +    ${GStreamer-Video_LIBRARIES}

That's only needed for VIDEO.

> Source/WebCore/PlatformEfl.cmake:239
> +    platform/graphics/gstreamer/GStreamerUtilities.cpp

This is needed by both VIDEO and WEB_AUDIO.

> Source/WebCore/PlatformEfl.cmake:240
> +    platform/graphics/gstreamer/GStreamerVersioning.cpp

This is only used by VIDEO but might be needed for both when the WebAudio implementation is ported to GStreamer-1.0... So might be good to move it now too.

> Source/WebKit/efl/ChangeLog:15
> +        (ewk_view_setting_web_audio_set): Querie if the Web Audio API feature is enabled.

typo: Querie

> Source/cmake/OptionsEfl.cmake:135
> +IF (ENABLE_WEB_AUDIO)
> +  IF (NOT ENABLE_VIDEO)
> +    FIND_PACKAGE(GStreamer REQUIRED)
> +    FIND_PACKAGE(GStreamer-App REQUIRED)
> +    FIND_PACKAGE(GStreamer-Base REQUIRED)
> +    FIND_PACKAGE(GStreamer-Interfaces REQUIRED)
> +    FIND_PACKAGE(GStreamer-Pbutils REQUIRED)
> +    FIND_PACKAGE(GStreamer-Plugins-Base REQUIRED)
> +    SET(WTF_USE_GSTREAMER 1)
> +    ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
> +  ENDIF ()
> +  FIND_PACKAGE(GStreamer-Audio REQUIRED)
> +  FIND_PACKAGE(GStreamer-FFT REQUIRED)
> +  ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
> +ENDIF ()

I'm no CMake expert but maybe there's a cleaner way to perform the checks depending on the enabled features?
Comment 10 Dongwoo Joshua Im (dwim) 2012-05-01 22:05:53 PDT
(In reply to comment #9)
> (From update of attachment 138755 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=138755&action=review
> 
> I think a new iteration of this patch would be needed. Looks good though.
> 
> > Source/WebCore/PlatformEfl.cmake:223
> >      ${GStreamer-Video_INCLUDE_DIRS}
> 
> That's only needed for VIDEO.
> 

I will move it.

> > Source/WebCore/PlatformEfl.cmake:232
> > +    ${GStreamer-Video_LIBRARIES}
> 
> That's only needed for VIDEO.
> 

I will move it, as well.

> > Source/WebCore/PlatformEfl.cmake:239
> > +    platform/graphics/gstreamer/GStreamerUtilities.cpp
> 
> This is needed by both VIDEO and WEB_AUDIO.
> 

I will move it to right place.

> > Source/WebCore/PlatformEfl.cmake:240
> > +    platform/graphics/gstreamer/GStreamerVersioning.cpp
> 
> This is only used by VIDEO but might be needed for both when the WebAudio implementation is ported to GStreamer-1.0... So might be good to move it now too.
> 

I will move it to right place, as well.

> > Source/WebKit/efl/ChangeLog:15
> > +        (ewk_view_setting_web_audio_set): Querie if the Web Audio API feature is enabled.
> 
> typo: Querie

I will fix it.

> 
> > Source/cmake/OptionsEfl.cmake:135
> > +IF (ENABLE_WEB_AUDIO)
> > +  IF (NOT ENABLE_VIDEO)
> > +    FIND_PACKAGE(GStreamer REQUIRED)
> > +    FIND_PACKAGE(GStreamer-App REQUIRED)
> > +    FIND_PACKAGE(GStreamer-Base REQUIRED)
> > +    FIND_PACKAGE(GStreamer-Interfaces REQUIRED)
> > +    FIND_PACKAGE(GStreamer-Pbutils REQUIRED)
> > +    FIND_PACKAGE(GStreamer-Plugins-Base REQUIRED)
> > +    SET(WTF_USE_GSTREAMER 1)
> > +    ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
> > +  ENDIF ()
> > +  FIND_PACKAGE(GStreamer-Audio REQUIRED)
> > +  FIND_PACKAGE(GStreamer-FFT REQUIRED)
> > +  ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
> > +ENDIF ()
> 
> I'm no CMake expert but maybe there's a cleaner way to perform the checks depending on the enabled features?

I think I can make it little bit simpler than this. I'll try.
Comment 11 Dongwoo Joshua Im (dwim) 2012-05-01 22:07:24 PDT
Created attachment 139745 [details]
Patch

I've fixed the patch regarding Philippe's comments.
Comment 12 Philippe Normand 2012-05-02 00:21:53 PDT
Comment on attachment 139745 [details]
Patch

Looks good now!
Comment 13 Dongwoo Joshua Im (dwim) 2012-05-02 00:47:34 PDT
(In reply to comment #12)
> (From update of attachment 139745 [details])
> Looks good now!

Thank you for your kind review!!
Comment 14 WebKit Review Bot 2012-05-02 00:57:51 PDT
Comment on attachment 139745 [details]
Patch

Clearing flags on attachment: 139745

Committed r115800: <http://trac.webkit.org/changeset/115800>
Comment 15 WebKit Review Bot 2012-05-02 00:58:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Raphael Kubo da Costa (:rakuco) 2012-05-20 20:26:23 PDT
I've posted a follow-up patch in bug 86982 removing the override for ENABLE_WEB_AUDIO from OptionsEfl.cmake.