add libmm-common 93/159193/3
authorKwangCheol Lee <kclee@dignsys.com>
Tue, 7 Nov 2017 10:08:12 +0000 (19:08 +0900)
committerKwangCheol Lee <kclee@dignsys.com>
Tue, 21 Nov 2017 07:31:43 +0000 (16:31 +0900)
Change-Id: Ia34612111037d832038a5bca0292f0ea8c19de39
Signed-off-by: KwangCheol Lee <kclee@dignsys.com>
configure.ac
packaging/gst-plugins-video-enc.spec
src/Makefile.am
src/gstnxvideoenc.c

index 8652d46390a01f0702c41d91ba692540e89c3d8c..6d350b864db1981798b5b5db4a731762e44cbcda 100644 (file)
@@ -67,6 +67,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 a25410cb510e53c2a616ef4c31ec7232e18492cb..a428eac216fefbb1d89fe9dfafb824a72cb5ace5 100644 (file)
@@ -1,6 +1,6 @@
 Name:    gst-plugins-video-enc
 Version: 1.0.3
-Release: 1
+Release: 2
 License: LGPLv2+
 Summary: nexell video encoder gstreamer plugin
 Group: Development/Libraries
@@ -14,6 +14,7 @@ BuildRequires:        gst-plugins-base-devel
 BuildRequires: libdrm-devel
 BuildRequires: nx-gst-meta-devel
 BuildRequires: nx-video-api-devel
+BuildRequires: pkgconfig(mm-common)
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
index 976ac29edf67b0a9ad6f5e1ab5d5790123eb7c2f..333c93787a08f74b632263e491a86c22d6d216c4 100644 (file)
@@ -16,6 +16,8 @@ libgstnxvideoenc_la_SOURCES = gstnxvideoenc.c
 # compiler and linker flags used to compile this plugin, set in configure.ac
 libgstnxvideoenc_la_CFLAGS =\
        $(GST_CFLAGS)                   \
+       $(MM_COMMON_CFLAGS) \
+       -DTIZEN_FEATURE_ARTIK530 \
        -I${includedir} \
        -I${includedir}/libdrm
 
index ec091ec52dd82a3af9fb704e9e46aeee916fc912..3ddbd896c32ae2c6d8fde19d486a4f9595a0d33e 100644 (file)
@@ -1097,6 +1097,10 @@ gst_nxvideoenc_handle_frame (GstVideoEncoder * encoder,
 
   meta = gst_buffer_get_mmvideobuffer_meta (frame->input_buffer);
   if (NULL != meta && meta->memory_index >= 0) {
+#ifdef TIZEN_FEATURE_ARTIK530
+    GST_ERROR ("%s: meta index=%d\n", __func__, meta->memory_index);
+    return FALSE;
+#else
     GstMemory *meta_block = NULL;
     MMVideoBuffer *mm_buf = NULL;
 
@@ -1258,6 +1262,7 @@ gst_nxvideoenc_handle_frame (GstVideoEncoder * encoder,
       gst_buffer_unmap (frame->output_buffer, &out_info);
     }
     gst_memory_unmap (meta_block, &in_info);
+#endif
   } else {
     if (FALSE == nxvideoenc->init) {
       gint i = 0;
@@ -1333,6 +1338,9 @@ gst_nxvideoenc_handle_frame (GstVideoEncoder * encoder,
       gst_video_codec_frame_unref (frame);
       return GST_FLOW_ERROR;
     }
+#ifdef TIZEN_FEATURE_ARTIK530
+    GstVideoFormatInfo *finfo = inframe.info.finfo;
+#endif
     copy_to_videomemory (&inframe, nxvideoenc->inbuf[nxvideoenc->buf_index]);
 
     memset (&encIn, 0x00, sizeof (encIn));
@@ -1349,6 +1357,9 @@ gst_nxvideoenc_handle_frame (GstVideoEncoder * encoder,
       gst_video_codec_frame_unref (frame);
       return GST_FLOW_ERROR;
     }
+#ifdef TIZEN_FEATURE_ARTIK530
+    inframe.info.finfo = finfo;
+#endif
 
     if (!g_strcmp0 (nxvideoenc->alignment, "au") && !g_strcmp0 (nxvideoenc->stream_format, "avc"))      // H.264 & AU
     {