emotion: add libvlc module

Summary:
Everything is implemented except visualization, mouse events and some
EMOTION_EVENT. Video can output RGBA, YUY2, YV12 or I420.

About the video sink: this emotion module use libvlc callbacks:
libvlc_video_set_format_callbacks and libvlc_video_set_callbacks. It may be
temporary. Indeed, an other solution is to add an Evas module inside vlc. But
this vlc module would need to link with emotion in order to use
_emotion_frame_new and _emotion_frame_resize private functions. I didn't
succeed to output a frame without these private functions: see
15daff4d3f

List of /* FIXME */:

 - Visualization not implemented since there is no API (for now) in libvlc.

 - Mouse events not implemented since there is no API (for now) in libvlc.

 - Some EMOTION_EVENT are not handled.

 - SIGSEGV in evas_gl_common_texture_nv12_update with
   EVAS_COLORSPACE_YCBCR420NV12601_PL colorspace.

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3071

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Thomas Guillem 2015-09-21 23:19:17 +02:00 committed by Cedric BAIL
parent 07fbef6437
commit afe6f5c3a1
5 changed files with 1835 additions and 0 deletions

View File

@ -4332,6 +4332,17 @@ AC_ARG_ENABLE([v4l2],
],
[want_v4l2="${efl_lib_optional_eeze}"])
AC_ARG_ENABLE([libvlc],
[AS_HELP_STRING([--enable-libvlc],[enable libvlc support. @<:@default=disabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
want_libvlc="yes"
else
want_libvlc="no"
fi
],
[want_libvlc="no"])
### Checks for programs
### Checks for libraries
@ -4354,11 +4365,13 @@ have_gst_xoverlay="no"
EMOTION_MODULE([xine], [${want_xine}])
EMOTION_MODULE([gstreamer], [${want_gstreamer}])
EMOTION_MODULE([gstreamer1], [${want_gstreamer1}])
EMOTION_MODULE([libvlc], [${want_libvlc}])
EMOTION_MODULE([generic], [${want_emotion_generic}])
EFL_ADD_FEATURE([EMOTION], [xine])
EFL_ADD_FEATURE([EMOTION], [gstreamer])
EFL_ADD_FEATURE([EMOTION], [gstreamer1])
EFL_ADD_FEATURE([EMOTION], [libvlc])
EFL_ADD_FEATURE([EMOTION], [generic], [${want_emotion_generic}])
EFL_EVAL_PKGS([EMOTION])

View File

@ -58,6 +58,20 @@ AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GSTREAMER1],
fi
])
dnl use: EMOTION_MODULE_DEP_CHECK_LIBVLC(want_static)
dnl where want_engine = yes or static
AC_DEFUN([EMOTION_MODULE_DEP_CHECK_LIBVLC],
[dnl
LIBVLC_VER=3.0
requirements="libvlc >= ${LIBVLC_VER}"
if test "$1" = "static"; then
EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_LIBVLC], [${requirements}])
else
PKG_CHECK_MODULES([EMOTION_MODULE_LIBVLC], [${requirements}])
fi
])
dnl use: EMOTION_MODULE_DEP_CHECK_GENERIC(want_static)
dnl where want_engine = yes or static
AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GENERIC],

View File

@ -157,6 +157,35 @@ modules_emotion_gstreamer1_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
# LibVLC
EMOTION_LIBVLC_SOURCES =\
modules/emotion/libvlc/emotion_libvlc.c
if EMOTION_STATIC_BUILD_LIBVLC
lib_emotion_libemotion_la_SOURCES += $(EMOTION_LIBVLC_SOURCES)
else
if EMOTION_BUILD_LIBVLC
emotionmodulelibvlcdir = $(libdir)/emotion/modules/libvlc/$(MODULE_ARCH)
emotionmodulelibvlc_LTLIBRARIES = modules/emotion/libvlc/module.la
# Workaround for broken parallel install support in automake (relink issue)
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
install_emotionmodulelibvlcLTLIBRARIES = install-emotionmodulelibvlcLTLIBRARIES
$(install_emotionmodulelibvlcLTLIBRARIES): install-libLTLIBRARIES
modules_emotion_libvlc_module_la_SOURCES = $(EMOTION_LIBVLC_SOURCES)
modules_emotion_libvlc_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
@EMOTION_CFLAGS@ \
@EMOTION_MODULE_LIBVLC_CFLAGS@
modules_emotion_libvlc_module_la_LIBADD = \
@USE_EMOTION_LIBS@ \
@EMOTION_MODULE_LIBVLC_LIBS@
modules_emotion_libvlc_module_la_DEPENDENCIES = @USE_EMOTION_INTERNAL_LIBS@
modules_emotion_libvlc_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_emotion_libvlc_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
# Generic
EMOTION_GENERIC_SOURCES = \
modules/emotion/generic/emotion_generic.h \

View File

@ -13,6 +13,10 @@ void xine_module_shutdown(void);
Eina_Bool gstreamer_module_init(void);
void gstreamer_module_shutdown(void);
#endif
#ifdef EMOTION_STATIC_BUILD_LIBVLC
Eina_Bool libvlc_module_init(void);
void libvlc_module_shutdown(void);
#endif
#ifdef EMOTION_STATIC_BUILD_GENERIC
Eina_Bool generic_module_init(void);
void generic_module_shutdown(void);
@ -78,6 +82,9 @@ _emotion_modules_load(void)
#endif
#ifdef EMOTION_BUILD_XINE
"xine",
#endif
#ifdef EMOTION_BUILD_LIBVLC
"libvlc",
#endif
NULL
};
@ -118,6 +125,9 @@ emotion_modules_init(void)
#if defined(EMOTION_STATIC_BUILD_GSTREAMER) || defined(EMOTION_STATIC_BUILD_GSTREAMER1)
gstreamer_module_init();
#endif
#ifdef EMOTION_STATIC_BUILD_LIBVLC
libvlc_module_init();
#endif
#ifdef EMOTION_STATIC_BUILD_GENERIC
generic_module_init();
#endif
@ -136,6 +146,9 @@ emotion_modules_shutdown(void)
#if defined(EMOTION_STATIC_BUILD_GSTREAMER) || defined(EMOTION_STATIC_BUILD_GSTREAMER1)
gstreamer_module_shutdown();
#endif
#ifdef EMOTION_STATIC_BUILD_LIBVLC
libvlc_module_shutdown();
#endif
#ifdef EMOTION_STATIC_BUILD_GENERIC
generic_module_shutdown();
#endif
@ -366,6 +379,7 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O
if (!m) m = _find_mod("xine");
if (!m) m = _find_mod("gstreamer");
if (!m) m = _find_mod("gstreamer1");
if (!m) m = _find_mod("libvlc");
if (m) eina_module_load(m);
}

File diff suppressed because it is too large Load Diff