intel / ozone-wayland

Wayland implementation for Chromium Ozone classes
BSD 3-Clause "New" or "Revised" License
218 stars 82 forks source link

Enable HWA video decoding support. #240

Closed kalyankondapally closed 10 years ago

kalyankondapally commented 10 years ago

I tried doing a clean build and media specific files fail to compile with the following error:

-next/include -I/home/kalyan/WaylandBuild/rel-next/include/libdrm -Wno-format -Wno-unused-result -m64 -march=x86-64 -fno-omit-frame-pointer -gline-tables-only -fsanitize=address -w -fsanitize=leak -O2 -fdata-sections -ffunction-sections -funwind-tables -g -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-deprecated -c ../../ozone/media/media_ozone_platform_wayland.cc -o obj/ozone/media/wayland.media_ozone_platform_wayland.o In file included from ../../ozone/media/media_ozone_platform_wayland.cc:9: In file included from ../../ozone/media/vaapi_video_decode_accelerator.h:30: ../../ui/gl/gl_bindings.h:230:10: fatal error: 'gl_bindings_autogen_gl.h' file not found

include "gl_bindings_autogen_gl.h"

     ^

1 error generated.

kalyankondapally commented 10 years ago

Disabled building media specific files for now.

https://github.com/01org/ozone-wayland/commit/e8ee3471a56a1c23e86687d9d90e59564c7ffb44

tiagovignatti commented 10 years ago

yes, I can confirm I've seen this as well. I just don't have right now the build tree here to test but maybe you can try something like this:

--- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -726,6 +726,9 @@ ] }], ['use_ozone == 1', {

kalyankondapally commented 10 years ago

Tried that but didn't help :(

joone commented 10 years ago

yes, it didn't help:

[23/8305] CXX obj/ozone/media/wayland.media_ozone_platform_wayland.o FAILED: c++ -MMD -MF obj/ozone/media/wayland.media_ozone_platform_wayland.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DDISABLE_NACL -DCHROMIUM_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_CAIRO=1 -DUSE_OZONE=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DTRACING_IS_OFFICIAL_BUILD=1 -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DOZONE_WAYLAND_IMPLEMENTATION -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -DSK_SUPPORT_LEGACY_GETTOPDEVICE -DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE -DSK_SUPPORT_LEGACY_N32_NAME -DSK_SUPPORT_LEGACY_SETCONFIG -DSK_IGNORE_ETC1_SUPPORT -DSK_SUPPORT_LEGACY_GETTOTALCLIP -DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1 -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DUSE_NSS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../.. -I../../third_party/libva -Igen/va -Igen/ui/gl -I../../skia/config -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -DMESA_EGL_NO_X11_HEADERS -Wno-format -Wno-unused-result -msse2 -mfpmath=sse -mmmx -m32 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated -c ../../ozone/media/media_ozone_platform_wayland.cc -o obj/ozone/media/wayland.media_ozone_platform_wayland.o In file included from ../../ozone/media/vaapi_video_decode_accelerator.h:30:0, from ../../ozone/media/media_ozone_platform_wayland.cc:9: ../../ui/gl/gl_bindings.h:13:19: fatal error: GL/gl.h: No such file or directory

include <GL/gl.h>

               ^

compilation terminated.

qjia7 commented 10 years ago

Hi @tiagovignatti, @kalyankondapally . The error log I met is as follows:

[   53s] ../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/ui/gl/gl_bindings.h:13:19: fatal error: GL/gl.h: No such file or directory
[   53s]  #include <GL/gl.h>
[   53s]                    ^
[   53s] compilation terminated.
[   53s] FAILED: c++ -MMD -MF obj/ozone/media/wayland.media_ozone_platform_wayland.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DOS_TIZEN=1 -DCHROMIUM_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_CAIRO=1 -DUSE_OZONE=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DUSE_UDEV -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DOZONE_WAYLAND_IMPLEMENTATION -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -DSK_SUPPORT_LEGACY_GETTOPDEVICE -DSK_SUPPORT_LEGACY_BITMAP_CONFIG -DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE -DSK_SUPPORT_LEGACY_N32_NAME -DSK_SUPPORT_LEGACY_SETCONFIG -DSK_IGNORE_ETC1_SUPPORT -DSK_IGNORE_GPU_DITHER -DSK_SUPPORT_LEGACY_GETTOTALCLIP -DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1 -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DUSE_NSS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/libva -Igen/va -Igen/ui/gl -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/skia/config -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/src/core -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/core -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/effects -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/pdf -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/gpu -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/lazy -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/pathops -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/pipe -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/ports -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/skia/include/utils -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/skia/ext -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/icu/source/i18n -I../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/third_party/icu/source/common -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -DMESA_EGL_NO_X11_HEADERS -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wno-format -Wno-unused-result -msse2 -mfpmath=sse -mmmx -m32 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated  -c ../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/ozone/media/media_ozone_platform_wayland.cc -o obj/ozone/media/wayland.media_ozone_platform_wayland.o
[   53s] In file included from ../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/ozone/media/vaapi_video_decode_accelerator.h:30:0,
[   53s]                  from ../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/ozone/media/media_ozone_platform_wayland.cc:9:
[   53s] ../../../../home/abuild/rpmbuild/BUILD/crosswalk/src/ui/gl/gl_bindings.h:13:19: fatal error: GL/gl.h: No such file or directory
[   53s]  #include <GL/gl.h>
[   53s]                    ^
[   53s] compilation terminated.
[   53s] ninja: build stopped: subcommand failed.
[   53s] error: Bad exit status from /var/tmp/rpm-tmp.4TTrQ1 (%build)

I can't reproduce the same error. I use crosswalk for tizen ivi as the build environment. I submit a patch #246 to fix my issue. Please verify it in your env. I think it should resolve yours too. Thanks.

kalyankondapally commented 10 years ago

@qjia7 I am building it on my side

qjia7 commented 10 years ago

I reproduced this issue. I find that if I build gl first, it will produce the the corresponding header file. Then, the wayland can be built successfully. However, if I add the dependency '<(DEPTH)/ui/gl/gl.gyp:gl' to the video.gypi, there will be a circle detected in the gyp. I think we need to find a proper position to build gl first.

ds-hwang commented 10 years ago

@qjia7 's solution doesn't work on component build (i.e. shared library build)

The cycle dependency is as follow; ui/gl/gl.gyp -> ui/ozone/ozone.gyp -> ozone/supplement.gyp -> ozone/media/video.gypi -> ui/gl/gl.gyp

IMO ozone-wayland shared library should not include media something using ui/gl/gl.gyp. ozone provides egl layer to ui/gl/gl.gyp of chromium. So it doesn't make sense for ozone to use ui/gl/gl.gyp

qjia7 commented 10 years ago

@ds-hwang Thanks for your comment. According to your description, I rechecked the code in ozone/media. I have submitted PR #259 to solve this issue. Please look at it and give your comment. Thank you very much.

tiagovignatti commented 10 years ago

@ds-hwang what ui/gl/ozone.gyp? There's not such gyp file! Besides, with the hack that @qjia7 added, there won't be anymore any ozone files being supplied by ui/gl/gl.gyp, so your logic is wrong anyway.

ds-hwang commented 10 years ago

@tiagovignatti it's errata; I mean ui/ozone/ozone.gyp. I fixed above comment.

kalyankondapally commented 10 years ago

Closing this as the HWA support is enabled now.