From e49e66731fcff05c389db933c7d8ad6704c3ad06 Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Wed, 26 Nov 2014 19:46:20 +0900 Subject: [PATCH] remove unused logging macros. Change-Id: I2643f235eb62a0f4b83083e38a749d3a6d1a2014 Signed-off-by: Kitae Kim --- src/gstmaru.c | 4 ---- src/gstmaruinterface3.c | 54 +------------------------------------------------ src/gstmarumem.c | 10 +-------- 3 files changed, 2 insertions(+), 66 deletions(-) diff --git a/src/gstmaru.c b/src/gstmaru.c index 95aedf3..5819cf9 100644 --- a/src/gstmaru.c +++ b/src/gstmaru.c @@ -58,8 +58,6 @@ gst_maru_codec_element_init () int fd = 0, ret = TRUE; void *buffer = MAP_FAILED; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - codec_element_init = TRUE; fd = open (CODEC_DEV, O_RDWR); @@ -120,8 +118,6 @@ out: close (fd); } - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return ret; } diff --git a/src/gstmaruinterface3.c b/src/gstmaruinterface3.c index b9c52b6..9c9efdb 100644 --- a/src/gstmaruinterface3.c +++ b/src/gstmaruinterface3.c @@ -77,8 +77,6 @@ invoke_device_api(int fd, int32_t ctx_index, int32_t api_index, IOCTL_Data ioctl_data = { 0, }; int ret = -1; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - ioctl_data.api_index = api_index; ioctl_data.ctx_index = ctx_index; if (mem_offset) { @@ -92,8 +90,6 @@ invoke_device_api(int fd, int32_t ctx_index, int32_t api_index, *mem_offset = ioctl_data.mem_offset; } - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return ret; } @@ -103,7 +99,6 @@ secure_device_mem (int fd, guint ctx_id, guint buf_size, gpointer* buffer) int ret = 0; IOCTL_Data data; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); data.ctx_index = ctx_id; data.buffer_size = buf_size; @@ -112,8 +107,6 @@ secure_device_mem (int fd, guint ctx_id, guint buf_size, gpointer* buffer) *buffer = (gpointer)((uint32_t)device_mem + data.mem_offset); GST_DEBUG ("device_mem %p, offset_size 0x%x", device_mem, data.mem_offset); - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return ret; } @@ -123,15 +116,11 @@ release_device_mem (int fd, gpointer start) int ret; uint32_t offset = start - device_mem; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - GST_DEBUG ("release device_mem start: %p, offset: 0x%x", start, offset); ret = ioctl (fd, IOCTL_RW(IOCTL_CMD_RELEASE_BUFFER), &offset); if (ret < 0) { GST_ERROR ("failed to release buffer\n"); } - - CODEC_LOG (DEBUG, "leave: %s\n", __func__); } static int @@ -150,21 +139,13 @@ get_context_index (int fd) static void buffer_free (gpointer start) { - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - release_device_mem (device_fd, start); - - CODEC_LOG (DEBUG, "leave: %s\n", __func__); } static void buffer_free2 (gpointer start) { - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - release_device_mem (device_fd, start - OFFSET_PICTURE_BUFFER); - - CODEC_LOG (DEBUG, "leave: %s\n", __func__); } static inline void fill_size_header(void *buffer, size_t size) @@ -185,8 +166,6 @@ init (CodecContext *ctx, CodecElement *codec, CodecDevice *dev) int ret; uint32_t mem_offset; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - if ((ctx->index = get_context_index(dev->fd)) <= 0) { GST_ERROR ("failed to get a context index"); return -1; @@ -221,20 +200,14 @@ init (CodecContext *ctx, CodecElement *codec, CodecDevice *dev) release_device_mem(dev->fd, device_mem + mem_offset); - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return opened; } static void deinit (CodecContext *ctx, CodecDevice *dev) { - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - GST_INFO ("close context %d", ctx->index); invoke_device_api (dev->fd, ctx->index, CODEC_DEINIT, NULL, -1); - - CODEC_LOG (DEBUG, "leave: %s\n", __func__); } // @@ -266,8 +239,6 @@ decode_video (GstMaruDec *marudec, uint8_t *inbuf, int inbuf_size, uint32_t mem_offset; size_t size = sizeof(inbuf_size) + sizeof(idx) + sizeof(in_offset) + inbuf_size; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - ret = secure_device_mem(dev->fd, ctx->index, size, &buffer); if (ret < 0) { GST_ERROR ("failed to get available memory to write inbuf"); @@ -317,8 +288,6 @@ decode_video (GstMaruDec *marudec, uint8_t *inbuf, int inbuf_size, release_device_mem(dev->fd, device_mem + mem_offset); } - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return len; } @@ -332,8 +301,6 @@ buffer_alloc_and_copy (GstPad *pad, guint64 offset, guint size, CodecContext *ctx; CodecDevice *dev; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - *buf = gst_buffer_new (); marudec = (GstMaruDec *)gst_pad_get_element_private(pad); @@ -395,8 +362,6 @@ buffer_alloc_and_copy (GstPad *pad, guint64 offset, guint size, gst_buffer_set_caps (*buf, caps); } - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return GST_FLOW_OK; } @@ -425,8 +390,6 @@ encode_video (CodecContext *ctx, uint8_t *outbuf, uint32_t mem_offset; size_t size = sizeof(inbuf_size) + sizeof(in_timestamp) + inbuf_size; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - ret = secure_device_mem(dev->fd, ctx->index, size, &buffer); if (ret < 0) { GST_ERROR ("failed to small size of buffer"); @@ -459,8 +422,6 @@ encode_video (CodecContext *ctx, uint8_t *outbuf, release_device_mem(dev->fd, device_mem + mem_offset); - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return len; } @@ -500,8 +461,6 @@ decode_audio (CodecContext *ctx, int16_t *samples, uint32_t mem_offset; size_t size = sizeof(inbuf_size) + inbuf_size; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - ret = secure_device_mem(dev->fd, ctx->index, size, &buffer); if (ret < 0) { GST_ERROR ("failed to get available memory to write inbuf"); @@ -523,7 +482,7 @@ decode_audio (CodecContext *ctx, int16_t *samples, return -1; } - GST_DEBUG ("decode_audio 2. ctx_id: %d, buffer = 0x%x", + GST_DEBUG ("decode_audio. ctx_id: %d, buffer = 0x%x", ctx->index, device_mem + mem_offset); struct audio_decode_output *decode_output = device_mem + mem_offset; @@ -535,12 +494,9 @@ decode_audio (CodecContext *ctx, int16_t *samples, GST_DEBUG ("decode_audio. sample_fmt %d sample_rate %d, channels %d, ch_layout %lld", ctx->audio.sample_fmt, ctx->audio.sample_rate, ctx->audio.channels, ctx->audio.channel_layout); -// GST_DEBUG ("decode_audio 3. ctx_id: %d len: %d", ctx->index, len); release_device_mem(dev->fd, device_mem + mem_offset); - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return len; } @@ -555,8 +511,6 @@ encode_audio (CodecContext *ctx, uint8_t *outbuf, uint32_t mem_offset; size_t size = sizeof(inbuf_size) + inbuf_size; - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - ret = secure_device_mem(dev->fd, ctx->index, inbuf_size, &buffer); if (ret < 0) { GST_ERROR ("failed to get available memory to write inbuf"); @@ -588,8 +542,6 @@ encode_audio (CodecContext *ctx, uint8_t *outbuf, release_device_mem(dev->fd, device_mem + mem_offset); - CODEC_LOG (DEBUG, "leave: %s\n", __func__); - return len; } @@ -601,12 +553,8 @@ encode_audio (CodecContext *ctx, uint8_t *outbuf, static void flush_buffers (CodecContext *ctx, CodecDevice *dev) { - CODEC_LOG (DEBUG, "enter: %s\n", __func__); - GST_DEBUG ("flush buffers of context: %d", ctx->index); invoke_device_api (dev->fd, ctx->index, CODEC_FLUSH_BUFFERS, NULL, -1); - - CODEC_LOG (DEBUG, "leave: %s\n", __func__); } static int diff --git a/src/gstmarumem.c b/src/gstmarumem.c index b8f80f8..ea711e0 100644 --- a/src/gstmarumem.c +++ b/src/gstmarumem.c @@ -38,8 +38,6 @@ _codec_info_data (CodecElement *codec, gpointer buffer) { int size = sizeof(size); - CODEC_LOG (DEBUG, "enter, %s\n", __func__); - GST_INFO ("type: %d, name: %s", codec->codec_type, codec->name); memcpy (buffer + size, &codec->codec_type, sizeof(codec->codec_type)); @@ -48,8 +46,6 @@ _codec_info_data (CodecElement *codec, gpointer buffer) memcpy (buffer + size, codec->name, sizeof(codec->name)); size += sizeof(codec->name); - CODEC_LOG (DEBUG, "leave, %s\n", __func__); - return size; } @@ -58,8 +54,6 @@ codec_init_data_to (CodecContext *ctx, CodecElement *codec, gpointer buffer) { int size = 0; - CODEC_LOG (DEBUG, "enter, %s\n", __func__); - size = _codec_info_data (codec, buffer); GST_INFO ("context_id: %d, name: %s, media type: %s", @@ -73,8 +67,6 @@ codec_init_data_to (CodecContext *ctx, CodecElement *codec, gpointer buffer) // data length size -= sizeof(size); memcpy (buffer, &size, sizeof(size)); - - CODEC_LOG (DEBUG, "leave, %s\n", __func__); } int @@ -130,7 +122,7 @@ codec_decode_video_data_to (int in_size, int idx, int64_t in_offset, size += in_size; } - CODEC_LOG (DEBUG, "decode_video. inbuf_size: %d\n", in_size); + GST_DEBUG ("decode_video. inbuf_size: %d", in_size); size -= sizeof(size); memcpy (buffer, &size, sizeof(size)); -- 2.7.4