remove compile warnings. 25/11825/1
authorKitae Kim <kt920.kim@samsung.com>
Wed, 6 Nov 2013 01:59:21 +0000 (10:59 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Wed, 6 Nov 2013 01:59:21 +0000 (10:59 +0900)
Change-Id: Ibaac72e1323d4fe9d5af62b414130ed74fe87bca
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
packaging/gst-plugins-emulator.changes
packaging/gst-plugins-emulator.spec
src/gstmaru.c
src/gstmarudec.c
src/gstmarudevice.c
src/gstmarudevice.h
src/gstmaruenc.c
src/gstmaruinterface.c
src/gstmarumem.c
src/gstmaruutils.c

index e4a8c62..22417e5 100644 (file)
@@ -1,3 +1,15 @@
+* Tue Oct 15 04:51:30 UTC 2013 Kitae Kim <kt920.kim@samsung.com>
+- fixed prevent issues.
+
+* Fri Oct  4 01:42:37 UTC 2013 Kitae Kim <kt920.kim@samsung.com>
+- changed rank of decoder elements.
+
+* Tue Oct  1 03:16:59 UTC 2013 Kitae Kim <kt920.kim@samsung.com>
+- Remove unnecessary log messages.
+
+* Mon Sep 30 02:13:23 UTC 2013 Kitae Kim <kt920.kim@samsung.com>
+- Added license file into rpm package.
+
 * Tue Sep 24 12:27:50 UTC 2013 Kitae Kim <kt920.kim@samsung.com>
 - changed rank of each element from NONE to PRIMARY.
 
index 157addb..df46504 100644 (file)
@@ -1,5 +1,5 @@
 Name: gst-plugins-emulator
-Version: 0.1.6
+Version: 0.1.10
 Release: 2 
 Summary: GStreamer Streaming-media framework plug-in for Tizen emulator.
 Group: TO_BE/FILLED_IN
index 32c80a1..19b88a8 100644 (file)
@@ -36,6 +36,7 @@
  */
 
 #include "gstmaru.h"
+#include "gstmaruutils.h"
 
 GST_DEBUG_CATEGORY (maru_debug);
 
index 4a6f2ab..0798ff4 100644 (file)
  *
  */
 
-#include "gstmaru.h"
+// #include "gstmaru.h"
+#include "gstmarudevice.h"
 #include "gstmaruutils.h"
 #include "gstmaruinterface.h"
-#include "gstmarudevice.h"
+// #include "gstmarudevice.h"
 
 #define GST_MARUDEC_PARAMS_QDATA g_quark_from_static_string("marudec-params")
 
index 3d0f6a4..600936a 100644 (file)
@@ -63,7 +63,6 @@ gst_maru_codec_device_open (CodecDevice *dev, int media_type)
   }
   dev->fd = fd;
 
-//  GST_DEBUG("succeeded to open %s. %d.\n", CODEC_DEV, fd);
   CODEC_LOG (INFO, "succeeded to open %s. %d.\n", CODEC_DEV, fd);
   dev->mem_info.index = dev->buf_size;
 
@@ -76,7 +75,6 @@ gst_maru_codec_device_open (CodecDevice *dev, int media_type)
     return -1;
   }
 
-//  GST_DEBUG("succeeded to map device memory.\n");
   CODEC_LOG (INFO, "succeeded to map device memory: %p.\n", mmapbuf);
   dev->fd = fd;
   dev->buf = mmapbuf;
@@ -86,11 +84,6 @@ gst_maru_codec_device_open (CodecDevice *dev, int media_type)
     device_fd = fd;
     CODEC_LOG (INFO, "video type! mmapbuf: %p fd: %d\n", mmapbuf, fd);
   }
-#if 0
-  else {
-    CODEC_LOG (INFO, "don't need to set device_mem because media type is not video. %d\n", media_type); 
-  }
-#endif
 
   CODEC_LOG (DEBUG, "leave: %s\n", __func__);
 
index 3603b30..d6679e3 100644 (file)
 #ifndef __GST_MARU_DEVICE_H__
 #define __GST_MARU_DEVICE_H__
 
-int gst_emul_codec_device_open (CodecDevice *dev, int media_type);
-int gst_emul_codec_device_close (CodecDevice *dev);
+#include "gstmaru.h"
 
-int gst_emul_avcodec_open (CodecContext *ctx,
+int gst_maru_codec_device_open (CodecDevice *dev, int media_type);
+int gst_maru_codec_device_close (CodecDevice *dev);
+
+int gst_maru_avcodec_open (CodecContext *ctx,
                           CodecElement *codec,
                           CodecDevice *dev);
-int gst_emul_avcodec_close (CodecContext *ctx, CodecDevice *dev);
+int gst_maru_avcodec_close (CodecContext *ctx, CodecDevice *dev);
+
 #endif
index ad0d102..4b09718 100644 (file)
@@ -28,9 +28,9 @@
  *
  */
 
+#include "gstmarudevice.h"
 #include "gstmaruutils.h"
 #include "gstmaruinterface.h"
-#include "gstmarudevice.h"
 #include <gst/base/gstadapter.h>
 
 #define GST_MARUENC_PARAMS_QDATA g_quark_from_static_string("maruenc-params")
@@ -644,8 +644,11 @@ GstFlowReturn
 gst_maruenc_chain_video (GstPad *pad, GstBuffer *buffer)
 {
   GstMaruEnc *maruenc = (GstMaruEnc *) (GST_PAD_PARENT (pad));
-  GstBuffer *outbuf;
-  gint ret_size = 0, frame_size;
+  GstBuffer *outbuf = NULL;
+  gint ret_size = 0, frame_size = 0;
+  int ret = 0;
+  uint32_t mem_offset = 0;
+  uint8_t *working_buf = NULL;
 
   GST_DEBUG_OBJECT (maruenc,
       "Received buffer of time %" GST_TIME_FORMAT,
@@ -707,32 +710,23 @@ gst_maruenc_chain_video (GstPad *pad, GstBuffer *buffer)
     }
   }
 #endif
-#if 1
-  {
-    int ret;
-    uint32_t mem_offset;
-    uint8_t *working_buf = NULL;
 
-    mem_offset = maruenc->dev->mem_info.offset;
-    working_buf = maruenc->dev->buf + mem_offset;
-    if (!working_buf) {
-    } else {
-      CODEC_LOG (INFO,
-          "encoded video. mem_offset = 0x%x\n",  mem_offset);
-
-      outbuf = gst_buffer_new_and_alloc (ret_size);
-//    memcpy (GST_BUFFER_DATA (outbuf), maruenc->working_buf, ret_size);
-      memcpy (GST_BUFFER_DATA (outbuf), working_buf, ret_size);
-      GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer);
-      GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer);
-    }
+  mem_offset = maruenc->dev->mem_info.offset;
+  working_buf = maruenc->dev->buf + mem_offset;
 
-    ret = ioctl(maruenc->dev->fd, CODEC_CMD_RELEASE_BUFFER, &mem_offset);
-    if (ret < 0) {
-      CODEC_LOG (ERR, "failed to release used buffer\n");
-    }
+  CODEC_LOG (DEBUG,
+    "encoded video. mem_offset = 0x%x\n",  mem_offset);
+
+  outbuf = gst_buffer_new_and_alloc (ret_size);
+//  memcpy (GST_BUFFER_DATA (outbuf), maruenc->working_buf, ret_size);
+  memcpy (GST_BUFFER_DATA (outbuf), working_buf, ret_size);
+  GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer);
+  GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer);
+
+  ret = ioctl(maruenc->dev->fd, CODEC_CMD_RELEASE_BUFFER, &mem_offset);
+  if (ret < 0) {
+    CODEC_LOG (ERR, "failed to release used buffer\n");
   }
-#endif
 
 #if 0
   if (maruenc->context->coded_frame) {
@@ -950,8 +944,10 @@ gst_maruenc_chain_audio (GstPad *pad, GstBuffer *buffer)
 static void
 gst_maruenc_flush_buffers (GstMaruEnc *maruenc, gboolean send)
 {
+#if 0
   GstBuffer *outbuf, *inbuf;
   gint ret_size = 0;
+#endif
 
   GST_DEBUG_OBJECT (maruenc, "flushing buffers with sending %d", send);
 
index d2bc2ad..f86394f 100644 (file)
@@ -88,8 +88,8 @@ static struct mem_info
 secure_device_mem (guint buf_size)
 {
   int ret = 0;
-  uint32_t mem_offset = 0, cmd;
-  struct mem_info info;
+  uint32_t mem_offset = 0, cmd = 0;
+  struct mem_info info = {0, };
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
index e09a862..a74a95b 100644 (file)
@@ -63,10 +63,8 @@ _codec_init_meta_to (CodecContext *ctx,
 
   size = _codec_info_data (codec, device_buf);
 
-  if (codec) {
   CODEC_LOG (INFO, "name: %s, media type: %s\n",
     codec->name, codec->media_type ? "AUDIO" : "VIDEO");
-  }
 
   if (codec->media_type == AVMEDIA_TYPE_AUDIO) {
     CODEC_LOG (DEBUG,
index 5fb3640..1c4e483 100644 (file)
@@ -219,7 +219,7 @@ gst_maru_codectype_to_audio_caps (CodecContext *ctx, const char *name,
   } else {
     GstCaps *temp;
     int i;
-    CodecContext ctx = { 0 };
+    CodecContext ctx = {{0}, {0}, 0};
 
     ctx.audio.channels = -1;
     caps = gst_caps_new_empty ();
@@ -527,7 +527,6 @@ gst_maru_caps_to_codecname (const GstCaps *caps, gchar *codec_name, CodecContext
 {
   const gchar *mimetype;
   const GstStructure *str;
-  gint wmvversion = 0;
 
   str = gst_caps_get_structure (caps, 0);
 
@@ -562,11 +561,6 @@ gst_maru_caps_to_codecname (const GstCaps *caps, gchar *codec_name, CodecContext
     }
   }
 
-#if 0 // check other types if it needs.
-  } else if () {
-  }
-#endif
-
 #if 0
   if (context != NULL) {
     if (video == TRUE) {