Replaced mm_types.h with header of libmm-common 43/151243/2
authorSejun Park <sejun79.park@samsung.com>
Wed, 20 Sep 2017 08:23:33 +0000 (17:23 +0900)
committerSejun Park <sejun79.park@samsung.com>
Thu, 21 Sep 2017 06:15:38 +0000 (15:15 +0900)
Change-Id: I45b45827109735f15f96bab871ab33c6ca566855

configure.ac
packaging/gst-plugins-video-dec.spec
src/Makefile.am
src/gstnxvideodec.c

index d65969eda0238521966b2949c433ed0e6cc4b283..64d21b3177e83354b1a94ccd76a673856a9aefe1 100644 (file)
@@ -68,6 +68,9 @@ PKG_CHECK_MODULES(GST, [
   ])
 ])
 
+PKG_CHECK_MODULES(MM_COMMON, mm-common)
+AC_SUBST(MM_COMMON_CFLAGS)
+
 dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
 AC_MSG_CHECKING([to see if compiler understands -Wall])
 save_CFLAGS="$CFLAGS"
index 1094beed90e6a0b8220abbe5eef9273f519935ff..020e0445a2802d5fe89f052f35bd885ce328c192 100644 (file)
@@ -13,6 +13,7 @@ BuildRequires:        glibc-devel
 BuildRequires: gst-plugins-base-devel
 BuildRequires: nx-gst-meta-devel
 BuildRequires: nx-video-api-devel
+BuildRequires: pkgconfig(mm-common)
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
index c617ebb4d3bd95a046b7c3cfec621ab5d0df67aa..6e49c9d5ee169e6ace2d1e6d8d58bb76956ba0ae 100644 (file)
@@ -16,6 +16,7 @@ libgstnxvideodec_la_SOURCES = gstnxvideodec.c decoder.c
 # compiler and linker flags used to compile this plugin, set in configure.ac
 libgstnxvideodec_la_CFLAGS = \
        $(GST_CFLAGS)           \
+       $(MM_COMMON_CFLAGS)     \
        -I$(includedir)
 
 libgstnxvideodec_la_LIBADD = \
index 4f862dd33245017e5f895d9bc18b313a707c5039..252dafa45e727c569f561cf483e4bf3356cd0208 100644 (file)
@@ -921,8 +921,7 @@ nxvideodec_mmvideobuf_copy (NX_V4L2DEC_OUT * pDecOut)
   memset ((void *) pMMVideoBuf, 0, sizeof (MMVideoBuffer));
 
   if (1 == pDecOut->hImg.planes) {
-    pMMVideoBuf->type = MM_VIDEO_BUFFER_TYPE_GEM;
-    pMMVideoBuf->format = MM_PIXEL_FORMAT_I420;
+    pMMVideoBuf->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
     pMMVideoBuf->plane_num = 3;
     pMMVideoBuf->width[0] = pDecOut->hImg.width;
     pMMVideoBuf->height[0] = pDecOut->hImg.height;
@@ -936,10 +935,11 @@ nxvideodec_mmvideobuf_copy (NX_V4L2DEC_OUT * pDecOut)
     pMMVideoBuf->size[0] = pDecOut->hImg.size[0];
     pMMVideoBuf->data[0] = pDecOut->hImg.pBuffer[0];
     pMMVideoBuf->handle_num = 1;
-    pMMVideoBuf->handle.gem[0] = pDecOut->hImg.flink[0];
-    pMMVideoBuf->buffer_index = pDecOut->dispIdx;
+    /* TODO need to convert from gem name to bo
+    pMMVideoBuf->handle.bo[0] = pDecOut->hImg.flink[0];
+    */
   } else if (3 == pDecOut->hImg.planes) {
-    pMMVideoBuf->type = MM_VIDEO_BUFFER_TYPE_GEM;
+    pMMVideoBuf->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
     pMMVideoBuf->format = MM_PIXEL_FORMAT_I420;
     pMMVideoBuf->plane_num = 3;
     pMMVideoBuf->width[0] = pDecOut->hImg.width;
@@ -954,10 +954,11 @@ nxvideodec_mmvideobuf_copy (NX_V4L2DEC_OUT * pDecOut)
     pMMVideoBuf->data[1] = pDecOut->hImg.pBuffer[1];
     pMMVideoBuf->data[2] = pDecOut->hImg.pBuffer[2];
     pMMVideoBuf->handle_num = 3;
-    pMMVideoBuf->handle.gem[0] = pDecOut->hImg.flink[0];
-    pMMVideoBuf->handle.gem[1] = pDecOut->hImg.flink[1];
-    pMMVideoBuf->handle.gem[2] = pDecOut->hImg.flink[2];
-    pMMVideoBuf->buffer_index = pDecOut->dispIdx;
+    /* TODO need to convert from gem name to bo
+    pMMVideoBuf->handle.bo[0] = pDecOut->hImg.flink[0];
+    pMMVideoBuf->handle.bo[1] = pDecOut->hImg.flink[1];
+    pMMVideoBuf->handle.bo[2] = pDecOut->hImg.flink[2];
+    */
   }
 
   pMeta = gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,