intel / libyami

Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.
Apache License 2.0
146 stars 106 forks source link

undefined reference to YamiV4L2_UseEglImage #796

Closed uartie closed 6 years ago

uartie commented 6 years ago

If --enable-x11 --enable-v4l2 --disable-wayland --disable-egl, then YamiV4L2_UseEglImage is declared but undefined.

xuguangxin commented 6 years ago

This no problem on my side too, could you double confirm this? thanks

xuguangxin commented 6 years ago

Sorry, I can reproduce now, let me see how to fix it

uartie commented 6 years ago

Sorry I did not give better details earlier...

When libyami is compiled with above configure args, this causes libyami-utils compile error undefined reference to YamiV4L2_UseEglImage if libyami-utils is configured with --enable-tests-gles --enable-v4l2 --enable-x11 --disable-wayland.

The problem is that when user disables egl in libyami but enables it in libyami-utils (with v4l2 enabled), then libyami-utils fails to compile. Libyami-utils should be able to detect this issue at configure time and act appropriately instead of allowing the issue to propagate into compile time.

The reason I filed this issue in libyami project and not libyami-utils is because it seems we might need libyami to produce some sort of pkgconfig information so that dependent projects can detect the support properly. Perhaps you have a better idea?

Please ignore this comment, it is a separate issue.

uartie commented 6 years ago

The issue is that YamiV4L2_UseEglImage gets declared in libyami/interface/v4l2_wrapper.h but does not get defined in libyami/v4l2/v4l2_wrapper.cpp because the declaration does not use the same macro guard as the definition.

xuguangxin commented 6 years ago

thanks @uartie , this will fixed by https://github.com/intel/libyami/pull/843