Enable to reoder timestamp 28/77028/3
authorSejun Park <sejun79.park@samsung.com>
Tue, 28 Jun 2016 09:55:53 +0000 (18:55 +0900)
committerSejun Park <sejun79.park@samsung.com>
Wed, 29 Jun 2016 02:31:22 +0000 (11:31 +0900)
Change-Id: I23882a517d5cc2ee444edbb3d9c442041a9e30c7

omx/gstomx.h
omx/gstomxvideodec.c
packaging/gst-omx.spec

index 12c98c9..862fc3c 100755 (executable)
@@ -183,36 +183,42 @@ struct _EnableGemBuffersParams
 
 enum
 {
-    BUF_SHARE_METHOD_PADDR = 0,
-    BUF_SHARE_METHOD_FD = 1,
-    BUF_SHARE_METHOD_TIZEN_BUFFER = 2,
-    BUF_SHARE_METHOD_FLUSH_BUFFER = 3,
+  BUF_SHARE_METHOD_PADDR = 0,
+  BUF_SHARE_METHOD_FD = 1,
+  BUF_SHARE_METHOD_TIZEN_BUFFER = 2,
+  BUF_SHARE_METHOD_FLUSH_BUFFER = 3,
 }; /* buf_share_method */
 
 /* Extended color formats */
 enum {
-    OMX_EXT_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
-    OMX_EXT_COLOR_FormatNV12LPhysicalAddress = 0x7F000002,
-    OMX_EXT_COLOR_FormatNV12Tiled = 0x7FC00002,
-    OMX_EXT_COLOR_FormatNV12TFdValue = 0x7F000012,
-    OMX_EXT_COLOR_FormatNV12LFdValue = 0x7F000013
+  OMX_EXT_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
+  OMX_EXT_COLOR_FormatNV12LPhysicalAddress = 0x7F000002,
+  OMX_EXT_COLOR_FormatNV12Tiled = 0x7FC00002,
+  OMX_EXT_COLOR_FormatNV12TFdValue = 0x7F000012,
+  OMX_EXT_COLOR_FormatNV12LFdValue = 0x7F000013
 };
 
 #ifdef GST_TIZEN_MODIFICATION
 /* Extended port settings. */
 enum {
-    OMX_IndexParamEnablePlatformSpecificBuffers = 0x7F000011
+  OMX_IndexParamEnablePlatformSpecificBuffers = 0x7F000011,
+  OMX_IndexParamGetAndroidNativeBuffer = 0x7F000012,
+  OMX_IndexParamUseAndroidNativeBuffer = 0x7F000013,
+  OMX_IndexParamStoreMetaDataBuffer = 0x7F000014,
+  OMX_IndexParamPrependSPSPPSToIDR = 0x7F000015,
+  OMX_IndexParamEnableTimestampReorder = 0x7F000016,
+  OMX_IndexParamSharedOutputFD = 0x7F000017
 };
 #endif
 
 /* modification: Add_component_vendor */
 enum GOmxVendor
 {
-    GOMX_VENDOR_DEFAULT,
-    GOMX_VENDOR_SLSI_SEC,
-    GOMX_VENDOR_SLSI_EXYNOS,
-    GOMX_VENDOR_QCT,
-    GOMX_VENDOR_SPRD
+  GOMX_VENDOR_DEFAULT,
+  GOMX_VENDOR_SLSI_SEC,
+  GOMX_VENDOR_SLSI_EXYNOS,
+  GOMX_VENDOR_QCT,
+  GOMX_VENDOR_SPRD
 };
 
 typedef enum {
index eee27a3..06e4c00 100755 (executable)
@@ -1871,6 +1871,7 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
   gchar *format_tmp;
   int i;
   EnableGemBuffersParams gemBuffers;
+  EnableGemBuffersParams config;
 #endif
 
   GST_DEBUG_OBJECT (self, "Trying to negotiate a video format with downstream");
@@ -1970,16 +1971,31 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
 
     /* Set platform specific buffer settings. to avoid plane support error.. */
 #ifdef GST_TIZEN_MODIFICATION
-    OMX_INIT_STRUCTURE(gemBuffers);
-    gemBuffers.enable = OMX_TRUE;
-    gemBuffers.nPortIndex = 1;
-      err =
+  OMX_INIT_STRUCTURE(gemBuffers);
+  gemBuffers.enable = OMX_TRUE;
+  gemBuffers.nPortIndex = 1;
+
+  err =
       gst_omx_component_set_parameter (self->dec,
       OMX_IndexParamEnablePlatformSpecificBuffers,&gemBuffers);
+
   if (err != OMX_ErrorNone) {
     GST_ERROR_OBJECT (self, "Failed to set video port format: %s (0x%08x)",
         gst_omx_error_to_string (err), err);
   }
+
+  OMX_INIT_STRUCTURE(config);
+  config.enable = OMX_TRUE;
+  config.nPortIndex = 0;
+
+  err =
+      gst_omx_component_set_parameter (self->dec,
+      OMX_IndexParamEnableTimestampReorder, &config);
+
+  if (err != OMX_ErrorNone) {
+    GST_ERROR_OBJECT (self, "Failed to set timestamp reorder: %s (0x%08x)",
+        gst_omx_error_to_string (err), err);
+  }
 #endif
   gst_caps_unref (intersection);
   return (err == OMX_ErrorNone);
index 3f406d0..a9c420e 100755 (executable)
@@ -1,6 +1,6 @@
 Name:           gst-omx
 Summary:        GStreamer plug-in that allows communication with OpenMAX IL components
-Version:        1.2.1
+Version:        1.2.2
 Release:        0
 License:        LGPL-2.1+
 Group:          Multimedia/Framework