From: Sejun Park Date: Fri, 31 Jul 2015 05:18:52 +0000 (+0900) Subject: Modify configuration for setting gstomx.conf X-Git-Tag: accepted/tizen/mobile/20150803.235842^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F62%2F45062%2F1;p=platform%2Fupstream%2Fgst-omx.git Modify configuration for setting gstomx.conf Change-Id: Ibc432bedef28da16acf3ddb96eb6258410a3e0bc --- diff --git a/config/Makefile.am b/config/Makefile.am old mode 100644 new mode 100755 index b2946fc..b9bac60 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -1,6 +1 @@ -EXTRA_DIST = gstomx.conf - -if USE_OMX_TARGET_ODROID -configdir = $(sysconfdir)/xdg -config_DATA = gstomx.conf -endif +SUBDIRS = bellagio rpi exynos diff --git a/config/exynos/Makefile.am b/config/exynos/Makefile.am new file mode 100755 index 0000000..8956718 --- /dev/null +++ b/config/exynos/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = gstomx.conf + +if USE_OMX_TARGET_EXYNOS +configdir = $(sysconfdir)/xdg +config_DATA = gstomx.conf +endif diff --git a/config/exynos/gstomx.conf b/config/exynos/gstomx.conf new file mode 100755 index 0000000..0106ef2 --- /dev/null +++ b/config/exynos/gstomx.conf @@ -0,0 +1,72 @@ +[omxmpeg2videodec] +type-name=GstOMXMPEG2VideoDec +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.MPEG2.Decoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role + +[omxmpeg4videodec] +type-name=GstOMXMPEG4VideoDec +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.MPEG4.Decoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role + +[omxh263dec] +type-name=GstOMXH263Dec +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.H263.Decoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role + +[omxh264dec] +type-name=GstOMXH264Dec +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.AVC.Decoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role + +[omxvc1dec] +type-name=GstOMXWMVDec +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.WMV.Decoder +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-component-role +sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},width=(int)[1,MAX],height=(int)[1,MAX] + +[omxh264enc] +type-name=GstOMXH264Enc +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.AVC.Encoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role + +[omxmpeg4enc] +type-name=GstOMXMPEG4VideoEnc +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.MPEG4.Encoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role + +[omxh263enc] +type-name=GstOMXH263Enc +core-name=/usr/lib/libExynosOMX_Core.so +component-name=OMX.Exynos.H263.Encoder +rank=258 +in-port-index=0 +out-port-index=1 +hacks=no-component-role diff --git a/config/odroid/Makefile.am b/config/odroid/Makefile.am new file mode 100755 index 0000000..b2946fc --- /dev/null +++ b/config/odroid/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = gstomx.conf + +if USE_OMX_TARGET_ODROID +configdir = $(sysconfdir)/xdg +config_DATA = gstomx.conf +endif diff --git a/configure.ac b/configure.ac old mode 100644 new mode 100755 index 71dd24b..1db36cb --- a/configure.ac +++ b/configure.ac @@ -190,7 +190,7 @@ AC_ARG_ENABLE(Bsymbolic, LDFLAGS="${SAVED_LDFLAGS}"]) AC_ARG_WITH([omx-target], - AS_HELP_STRING([--with-omx-target],[Use this OpenMAX IL target (generic, bellagio, rpi)]), + AS_HELP_STRING([--with-omx-target],[Use this OpenMAX IL target (generic, bellagio, rpi, exynos)]), [ac_cv_omx_target="$withval"], [ac_cv_omx_target="generic"]) ac_cv_omx_target_struct_packing="none" @@ -206,8 +206,8 @@ case "${ac_cv_omx_target}" in bellagio) AC_DEFINE(USE_OMX_TARGET_BELLAGIO, 1, [Use Bellagio OpenMAX IL target]) ;; - odroid) - AC_DEFINE(USE_OMX_TARGET_ODROID, 1, [Use Odroid OpenMAX IL target]) + exynos) + AC_DEFINE(USE_OMX_TARGET_EXYNOS, 1, [Use Exynos OpenMAX IL target]) ;; *) AC_ERROR([invalid OpenMAX IL target]) @@ -216,7 +216,7 @@ esac AM_CONDITIONAL(USE_OMX_TARGET_GENERIC, test "x$ac_cv_omx_target" = "xgeneric") AM_CONDITIONAL(USE_OMX_TARGET_BELLAGIO, test "x$ac_cv_omx_target" = "xbellagio") AM_CONDITIONAL(USE_OMX_TARGET_RPI, test "x$ac_cv_omx_target" = "xrpi") -AM_CONDITIONAL(USE_OMX_TARGET_ODROID, test "x$ac_cv_omx_target" = "xodroid") +AM_CONDITIONAL(USE_OMX_TARGET_EXYNOS, test "x$ac_cv_omx_target" = "xexynos") AC_ARG_WITH([omx-struct-packing], AS_HELP_STRING([--with-omx-struct-packing],[Force OpenMAX struct packing, (default is none)]), @@ -349,6 +349,7 @@ tools/Makefile config/Makefile config/bellagio/Makefile config/rpi/Makefile +config/exynos/Makefile ) AC_OUTPUT diff --git a/omx/gstomx.c b/omx/gstomx.c old mode 100644 new mode 100755 index e0e360f..dddd0a4 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -70,12 +70,8 @@ gst_omx_core_acquire (const gchar * filename) #ifdef USE_OMX_TARGET_RPI { #else -#ifdef USE_OMX_TARGET_ODROID - if (g_str_has_suffix (filename, "vc/lib/libopenmaxil.so")) { -#else if (g_str_has_suffix (filename, "vc/lib/libopenmaxil.so")) { #endif -#endif gchar *bcm_host_filename; gchar *bcm_host_path; GModule *bcm_host_module; @@ -1773,7 +1769,6 @@ gst_omx_port_tbm_allocate_dec_buffers (tbm_bufmgr bufMgr, GstOMXPort * port, int ptr->handle.bo[0] = gst_omx_tbm_allocate_bo(bufMgr, port->port_def.nBufferSize); ptr->handle.dmabuf_fd[0] = gst_omx_tbm_get_bo_fd(ptr->handle.bo[0]); ptr->data[0] = gst_omx_tbm_get_bo_ptr(ptr->handle.bo[0]); - ptr->handle.paddr[0] = ptr->data[0]; ptr->size[0] = port->port_def.nBufferSize; ptr->type = MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS; } @@ -1794,7 +1789,6 @@ gst_omx_port_tbm_allocate_dec_buffers (tbm_bufmgr bufMgr, GstOMXPort * port, int ptr->handle.bo[1] = gst_omx_tbm_allocate_bo(bufMgr, uv_size); ptr->handle.dmabuf_fd[1] = gst_omx_tbm_get_bo_fd(ptr->handle.bo[1]); ptr->data[1] = gst_omx_tbm_get_bo_ptr(ptr->handle.bo[1]); - ptr->handle.paddr[1] = ptr->data[1]; ptr->size[1] = uv_size; ptr->type = MM_VIDEO_BUFFER_TYPE_DMABUF_FD; GST_ERROR(" fd[0]:%d, bo[0]:%p fd[1]:%d, bo[1]:%p, a[0]:%p",ptr->handle.dmabuf_fd[0],ptr->handle.bo[0],ptr->handle.dmabuf_fd[1],ptr->handle.bo[1], ptr->data[0]); @@ -2888,7 +2882,6 @@ gst_omx_tbm_get_bo_ptr(tbm_bo bo) { tbm_bo_handle TBMBoHandle; TBMBoHandle = tbm_bo_map(bo, TBM_DEVICE_CPU,TBM_OPTION_WRITE); - //TBMBoHandle = tbm_bo_get_handle (bo, TBM_DEVICE_CPU); if(TBMBoHandle.ptr != NULL) return TBMBoHandle.ptr; return NULL; diff --git a/packaging/gst-omx.spec b/packaging/gst-omx.spec index 5573cb8..33218c8 100755 --- a/packaging/gst-omx.spec +++ b/packaging/gst-omx.spec @@ -1,7 +1,7 @@ Name: gst-omx Summary: GStreamer plug-in that allows communication with OpenMAX IL components Version: 1.0.0 -Release: 4 +Release: 5 License: LGPL-2.1+ Group: Multimedia/Framework Source0: %{name}-%{version}.tar.gz @@ -30,7 +30,7 @@ export CFLAGS+=" -DEXYNOS_SPECIFIC" export CFLAGS+=" -DUSE_TBM" %endif -%configure --disable-static --prefix=/usr +%configure --disable-static --prefix=/usr --with-omx-target=exynos make %{?jobs:-j%jobs} @@ -39,14 +39,12 @@ make %{?jobs:-j%jobs} rm -rf %{buildroot} mkdir -p %{buildroot}/usr/share/license cp COPYING %{buildroot}/usr/share/license/%{name} -mkdir -p %{buildroot}/usr/etc -cp -arf config/odroid/gstomx.conf %{buildroot}/usr/etc %make_install %files %manifest gst-omx.manifest %defattr(-,root,root,-) %{_libdir}/gstreamer-1.0/libgstomx.so -/usr/etc/gstomx.conf +/etc/xdg/gstomx.conf /usr/share/license/%{name}