From: johnny nam Date: Tue, 17 Oct 2017 07:43:09 +0000 (+0900) Subject: Change GST_RANK_NONE to GST_RANK_PRIMARY + 1, and Modify "g_printf" to GST_LOG X-Git-Tag: submit/tizen_4.0/20171122.022337~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6968a2f17e3d1edf68117aad5a28cc744eaa2e9e;p=platform%2Fadaptation%2Fnexell%2Fgst-plugins-video-dec.git Change GST_RANK_NONE to GST_RANK_PRIMARY + 1, and Modify "g_printf" to GST_LOG Change-Id: Ib568a10c4accb8dce81d4344d94863970e9c142b Signed-off-by: johnny Nam --- diff --git a/src/decoder.c b/src/decoder.c index 8220df9..8011eee 100644 --- a/src/decoder.c +++ b/src/decoder.c @@ -7,6 +7,7 @@ #include #include "decoder.h" + #include "gstnxvideodec.h" #define MAX_OUTPUT_BUF 6 @@ -49,7 +50,7 @@ FindCodecInfo (GstVideoCodecState * pState, NX_VIDEO_DEC_STRUCT * pDecHandle) pDecHandle->fpsDen = 1; } - g_print ("mime type = %s\n", pMime); + GST_LOG ("mime type = %s\n", pMime); // H.264 if (!strcmp (pMime, "video/x-h264")) { @@ -132,7 +133,7 @@ GetExtraInfo (NX_VIDEO_DEC_STRUCT * pDecHandle, guint8 * pCodecData, return FALSE; } else { // Debugging - g_print ("NumSps = %d, NumPps = %d, type = %s\n", + GST_DEBUG ("NumSps = %d, NumPps = %d, type = %s\n", pDecHandle->pH264Info->numSps, pDecHandle->pH264Info->numPps, (pDecHandle->pH264Info->eStreamType == @@ -142,7 +143,7 @@ GetExtraInfo (NX_VIDEO_DEC_STRUCT * pDecHandle, guint8 * pCodecData, memcpy (pDecHandle->pExtraData, pCodecData, codecDataSize); } } else { - g_print ("Codec_data not exist.\n"); + GST_LOG ("Codec_data not exist.\n"); } return TRUE; @@ -347,7 +348,7 @@ VideoDecodeFrame (NX_VIDEO_DEC_STRUCT * pDecHandle, GstBuffer * pGstBuf, } if (0 != ret) { - g_print ("NX_V4l2DecDecodeFrame!!!!, ret = %d\n", ret); + GST_ERROR ("NX_V4l2DecDecodeFrame!!!!, ret = %d\n", ret); ret = DEC_ERR; } } @@ -597,7 +598,7 @@ Initialize (NX_VIDEO_DEC_STRUCT * pHDec, GstBuffer * pGstBuf, } if (0 != ret) { - g_print ("NX_V4l2DecDecodeFrame!!!!, ret = %d\n", ret); + GST_ERROR ("NX_V4l2DecDecodeFrame!!!!, ret = %d\n", ret); ret = DEC_ERR; } } else { @@ -662,7 +663,7 @@ InitializeCodaVpu (NX_VIDEO_DEC_STRUCT * pHDec, guint8 * pSeqInfo, pHDec->minRequiredFrameBuffer = seqOut.minBuffers; pHDec->pSem = VDecSemCreate (MAX_OUTPUT_BUF); - g_print + GST_LOG ("<<<<<<<<<< InitializeCodaVpu(Min=%d, %dx%d) (ret = %d) >>>>>>>>>\n", pHDec->minRequiredFrameBuffer, seqOut.width, seqOut.height, ret); @@ -912,7 +913,7 @@ PopVideoTimeStamp (NX_VIDEO_DEC_STRUCT * hDec, gint64 * pTimestamp, hDec->outTimeStamp[minIdx].flag = (gint) - 1; return 0; } else { -// g_print("Cannot Found Time Stamp!!!\n"); +// GST_ERROR ("Cannot Found Time Stamp!!!\n"); return -1; } } diff --git a/src/gstnxvideodec.c b/src/gstnxvideodec.c index fdc4e5b..56f6a53 100644 --- a/src/gstnxvideodec.c +++ b/src/gstnxvideodec.c @@ -445,7 +445,7 @@ gst_nxvideodec_set_format (GstVideoDecoder * pDecoder, } gst_buffer_unmap (pCodecData, &mapInfo); } else { - g_print ("No Codec Data\n"); + GST_LOG ("No Codec Data\n"); } if (pDecHandle->codecType == V4L2_PIX_FMT_H264) { @@ -893,7 +893,7 @@ nxvideodec_buffer_finalize (gpointer pData) DisplayDone (pMeta->pNxVideoDec->pNxVideoDecHandle, pMeta->v4l2BufferIdx); if (ret) { - g_print ("Fail: DisplayDone !"); + GST_ERROR ("Fail: DisplayDone !"); } } pthread_mutex_unlock (&pMeta->pNxVideoDec->mutex); @@ -985,7 +985,7 @@ plugin_init (GstPlugin * plugin) /* FIXME Remember to set the rank if it's an element that is meant to be autoplugged by decodebin. */ - ret = gst_element_register (plugin, "nxvideodec", GST_RANK_NONE, + ret = gst_element_register (plugin, "nxvideodec", GST_RANK_PRIMARY + 1, GST_TYPE_NXVIDEODEC); FUNC_OUT ();