tizenwlsink : change type and function name 61/160061/1 accepted/tizen/unified/20171115.061238 submit/tizen/20171114.004442 submit/tizen/20171115.013055
authorHyunil <hyunil46.park@samsung.com>
Tue, 14 Nov 2017 09:11:03 +0000 (18:11 +0900)
committerHyunil <hyunil46.park@samsung.com>
Tue, 14 Nov 2017 09:11:03 +0000 (18:11 +0900)
Change-Id: Id275fec91a931e1a490f48392c722660de292f81
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
12 files changed:
tizenwlsink/src/Makefile.am
tizenwlsink/src/gsttizenwlsink.c [moved from tizenwlsink/src/gstwaylandsink.c with 86% similarity, mode: 0644]
tizenwlsink/src/gsttizenwlsink.h [moved from tizenwlsink/src/gstwaylandsink.h with 74% similarity]
tizenwlsink/src/tizen-wlshmallocator.c [moved from tizenwlsink/src/wlshmallocator.c with 85% similarity]
tizenwlsink/src/tizen-wlshmallocator.h [new file with mode: 0644]
tizenwlsink/src/tizen-wlvideoformat.c
tizenwlsink/src/tizen-wlvideoformat.h [changed mode: 0755->0644]
tizenwlsink/src/wlbuffer.c
tizenwlsink/src/wldisplay.c
tizenwlsink/src/wlshmallocator.h [deleted file]
tizenwlsink/src/wlvideoformat.c
tizenwlsink/src/wlwindow.c

index 998787f..a90af52 100644 (file)
@@ -1,8 +1,8 @@
 plugin_LTLIBRARIES = libgsttizenwlsink.la
 
 libgsttizenwlsink_la_SOURCES =  \
-       gstwaylandsink.c \
-       wlshmallocator.c \
+       gsttizenwlsink.c \
+       tizen-wlshmallocator.c \
        wlbuffer.c \
        wldisplay.c \
        wlwindow.c \
@@ -19,8 +19,8 @@ libgsttizenwlsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgsttizenwlsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = \
-       gstwaylandsink.h \
-       wlshmallocator.h \
+       gsttizenwlsink.h \
+       tizen-wlshmallocator.h \
        wlbuffer.h \
        wldisplay.h \
        wlwindow.h \
@@ -37,9 +37,9 @@ CLEANFILES = scaler-protocol.c scaler-client-protocol.h
 %-client-protocol.h : %.xml
        $(wayland_scanner) client-header < $< > $@
 
-gstwaylandsink.c: scaler-client-protocol.h
+gsttizenwlsink.c: scaler-client-protocol.h
 
-wlshmallocator.c: scaler-client-protocol.h
+tizen-wlshmallocator.c: scaler-client-protocol.h
 
 wlbuffer.c: scaler-client-protocol.h
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from tizenwlsink/src/gstwaylandsink.c
rename to tizenwlsink/src/gsttizenwlsink.c
index 4a33e8c..b693718
 #include <config.h>
 #endif
 
-#include "gstwaylandsink.h"
+#include "gsttizenwlsink.h"
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 #include <mm_types.h>
 #include "tizen-wlvideoformat.h"
 #endif
 #include "wlvideoformat.h"
 #include "wlbuffer.h"
-#include "wlshmallocator.h"
+#include "tizen-wlshmallocator.h"
 
 #include <gst/video/videooverlay.h>
 
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 #define GST_APP_EVENT_FLUSH_BUFFER_NAME "application/flush-buffer"
 
-#define GST_TYPE_WAYLANDSINK_DISPLAY_GEOMETRY_METHOD (gst_waylandsink_display_geometry_method_get_type())
-#define GST_TYPE_WAYLANDSINK_ROTATE_ANGLE (gst_waylandsink_rotate_angle_get_type())
-#define GST_TYPE_WAYLANDSINK_FLIP (gst_waylandsink_flip_get_type())
+#define GST_TYPE_TIZEN_WL_SINK_DISPLAY_GEOMETRY_METHOD (gst_tizen_wl_sink_display_geometry_method_get_type())
+#define GST_TYPE_TIZEN_WL_SINK_ROTATE_ANGLE (gst_tizen_wl_sink_rotate_angle_get_type())
+#define GST_TYPE_TIZEN_WL_SINK_FLIP (gst_tizen_wl_sink_flip_get_type())
 
 static GType
-gst_waylandsink_rotate_angle_get_type (void)
+gst_tizen_wl_sink_rotate_angle_get_type (void)
 {
-  static GType waylandsink_rotate_angle_type = 0;
+  static GType tizen_wl_sink_rotate_angle_type = 0;
   static const GEnumValue rotate_angle_type[] = {
     {0, "No rotate", "DEGREE_0"},
     {1, "Rotate 90 degree", "DEGREE_90"},
@@ -76,20 +76,20 @@ gst_waylandsink_rotate_angle_get_type (void)
     {4, NULL, NULL},
   };
 
-  if (!waylandsink_rotate_angle_type) {
-    waylandsink_rotate_angle_type =
-        g_enum_register_static ("GstWaylandSinkRotateAngleType",
+  if (!tizen_wl_sink_rotate_angle_type) {
+    tizen_wl_sink_rotate_angle_type =
+        g_enum_register_static ("GstTizenWlSinkRotateAngleType",
         rotate_angle_type);
   }
 
-  return waylandsink_rotate_angle_type;
+  return tizen_wl_sink_rotate_angle_type;
 }
 
 
 static GType
-gst_waylandsink_display_geometry_method_get_type (void)
+gst_tizen_wl_sink_display_geometry_method_get_type (void)
 {
-  static GType waylandsink_display_geometry_method_type = 0;
+  static GType tizen_wl_sink_display_geometry_method_type = 0;
   static const GEnumValue display_geometry_method_type[] = {
     {0, "Letter box", "LETTER_BOX"},
     {1, "Origin size", "ORIGIN_SIZE"},
@@ -100,18 +100,18 @@ gst_waylandsink_display_geometry_method_get_type (void)
     {6, NULL, NULL},
   };
 
-  if (!waylandsink_display_geometry_method_type) {
-    waylandsink_display_geometry_method_type =
-        g_enum_register_static ("GstWaylandSinkDisplayGeometryMethodType",
+  if (!tizen_wl_sink_display_geometry_method_type) {
+    tizen_wl_sink_display_geometry_method_type =
+        g_enum_register_static ("GstTizenWlSinkDisplayGeometryMethodType",
         display_geometry_method_type);
   }
-  return waylandsink_display_geometry_method_type;
+  return tizen_wl_sink_display_geometry_method_type;
 }
 
 static GType
-gst_waylandsink_flip_get_type (void)
+gst_tizen_wl_sink_flip_get_type (void)
 {
-  static GType waylandsink_flip_type = 0;
+  static GType tizen_wl_sink_flip_type = 0;
   static const GEnumValue flip_type[] = {
     {FLIP_NONE, "Flip NONE", "FLIP_NONE"},
     {FLIP_HORIZONTAL, "Flip HORIZONTAL", "FLIP_HORIZONTAL"},
@@ -120,12 +120,12 @@ gst_waylandsink_flip_get_type (void)
     {FLIP_NUM, NULL, NULL},
   };
 
-  if (!waylandsink_flip_type) {
-    waylandsink_flip_type =
-        g_enum_register_static ("GstWaylandSinkFlipType", flip_type);
+  if (!tizen_wl_sink_flip_type) {
+    tizen_wl_sink_flip_type =
+        g_enum_register_static ("GstTizenWlSinkFlipType", flip_type);
   }
 
-  return waylandsink_flip_type;
+  return tizen_wl_sink_flip_type;
 }
 
 #endif
@@ -176,8 +176,8 @@ enum
 #endif
 };
 
-GST_DEBUG_CATEGORY (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 
 static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
@@ -192,67 +192,68 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
             "YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }")));
 #endif
 
-static void gst_wayland_sink_get_property (GObject * object,
+static void gst_tizen_wl_sink_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
-static void gst_wayland_sink_set_property (GObject * object,
+static void gst_tizen_wl_sink_set_property (GObject * object,
     guint prop_id, const GValue * value, GParamSpec * pspec);
-static void gst_wayland_sink_finalize (GObject * object);
+static void gst_tizen_wl_sink_finalize (GObject * object);
 
-static GstStateChangeReturn gst_wayland_sink_change_state (GstElement * element,
-    GstStateChange transition);
-static GstCaps *gst_wayland_sink_get_caps (GstBaseSink * bsink,
+static GstStateChangeReturn gst_tizen_wl_sink_change_state (GstElement *
+    element, GstStateChange transition);
+static GstCaps *gst_tizen_wl_sink_get_caps (GstBaseSink * bsink,
     GstCaps * filter);
-static gboolean gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
-static gboolean gst_wayland_sink_preroll (GstBaseSink * bsink,
+static gboolean gst_tizen_wl_sink_set_caps (GstBaseSink * bsink,
+    GstCaps * caps);
+static gboolean gst_tizen_wl_sink_preroll (GstBaseSink * bsink,
     GstBuffer * buffer);
-static gboolean
-gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query);
-static gboolean gst_wayland_sink_render (GstBaseSink * bsink,
+static gboolean gst_tizen_wl_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query);
+static gboolean gst_tizen_wl_sink_render (GstBaseSink * bsink,
     GstBuffer * buffer);
 
 /* VideoOverlay interface */
-static void gst_wayland_sink_videooverlay_init (GstVideoOverlayInterface *
+static void gst_tizen_wl_sink_videooverlay_init (GstVideoOverlayInterface *
     iface);
-static void gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay,
+static void gst_tizen_wl_sink_set_window_handle (GstVideoOverlay * overlay,
     guintptr handle);
 static void
-gst_wayland_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
+gst_tizen_wl_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
     guintptr wl_surface_id);
-static void gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay,
+static void gst_tizen_wl_sink_set_render_rectangle (GstVideoOverlay * overlay,
     gint x, gint y, gint w, gint h);
-static void gst_wayland_sink_expose (GstVideoOverlay * overlay);
+static void gst_tizen_wl_sink_expose (GstVideoOverlay * overlay);
 
 /* WaylandVideo interface */
 #if 0
-static void gst_wayland_sink_set_context (GstElement * element,
+static void gst_tizen_wl_sink_set_context (GstElement * element,
     GstContext * context);
-static void gst_wayland_sink_waylandvideo_init (GstWaylandVideoInterface *
+static void gst_tizen_wl_sink_waylandvideo_init (GstWaylandVideoInterface *
     iface);
-static void gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video);
-static void gst_wayland_sink_end_geometry_change (GstWaylandVideo * video);
+static void gst_tizen_wl_sink_begin_geometry_change (GstWaylandVideo * video);
+static void gst_tizen_wl_sink_end_geometry_change (GstWaylandVideo * video);
 #endif
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-static gboolean gst_wayland_sink_event (GstBaseSink * bsink, GstEvent * event);
-static void gst_wayland_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+static gboolean gst_tizen_wl_sink_event (GstBaseSink * bsink, GstEvent * event);
+static void gst_tizen_wl_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
     GstClockTime * start, GstClockTime * end);
-static void gst_wayland_sink_update_window_geometry (GstWaylandSink * sink);
-static void render_last_buffer (GstWaylandSink * sink);
+static void gst_tizen_wl_sink_update_window_geometry (GstTizenWlSink * sink);
+static void render_last_buffer (GstTizenWlSink * sink);
 
 static guint gst_waylandsink_signals[LAST_SIGNAL] = { 0 };
 
 #endif
-#define gst_wayland_sink_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstWaylandSink, gst_wayland_sink, GST_TYPE_VIDEO_SINK,
+#define gst_tizen_wl_sink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstTizenWlSink, gst_tizen_wl_sink, GST_TYPE_VIDEO_SINK,
     G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
-        gst_wayland_sink_videooverlay_init)
+        gst_tizen_wl_sink_videooverlay_init)
 #if 0
     G_IMPLEMENT_INTERFACE (GST_TYPE_WAYLAND_VIDEO,
-        gst_wayland_sink_waylandvideo_init)
+        gst_tizen_wl_sink_waylandvideo_init)
 #endif
-);
+    );
 
 static void
-gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
+gst_tizen_wl_sink_class_init (GstTizenWlSinkClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
@@ -263,9 +264,9 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
   gstelement_class = (GstElementClass *) klass;
   gstbasesink_class = (GstBaseSinkClass *) klass;
 
-  gobject_class->set_property = gst_wayland_sink_set_property;
-  gobject_class->get_property = gst_wayland_sink_get_property;
-  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_wayland_sink_finalize);
+  gobject_class->set_property = gst_tizen_wl_sink_set_property;
+  gobject_class->get_property = gst_tizen_wl_sink_get_property;
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_finalize);
 
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&sink_template));
@@ -278,20 +279,21 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
       "George Kiagiadakis <george.kiagiadakis@collabora.com>");
 
   gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_wayland_sink_change_state);
+      GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_change_state);
 #if 0
   gstelement_class->set_context =
-      GST_DEBUG_FUNCPTR (gst_wayland_sink_set_context);
+      GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_set_context);
 #endif
-  gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_wayland_sink_get_caps);
-  gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_wayland_sink_set_caps);
-  gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_wayland_sink_preroll);
+  gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_get_caps);
+  gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_set_caps);
+  gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_preroll);
   gstbasesink_class->propose_allocation =
-      GST_DEBUG_FUNCPTR (gst_wayland_sink_propose_allocation);
-  gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_wayland_sink_render);
+      GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_propose_allocation);
+  gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_render);
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-  gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_wayland_sink_event);
-  gstbasesink_class->get_times = GST_DEBUG_FUNCPTR (gst_wayland_sink_get_times);
+  gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_event);
+  gstbasesink_class->get_times =
+      GST_DEBUG_FUNCPTR (gst_tizen_wl_sink_get_times);
 #endif
 
   g_object_class_install_property (gobject_class, PROP_DISPLAY,
@@ -331,20 +333,20 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
   g_object_class_install_property (gobject_class, PROP_ROTATE_ANGLE,
       g_param_spec_enum ("rotate", "Rotate angle",
           "Rotate angle of display output",
-          GST_TYPE_WAYLANDSINK_ROTATE_ANGLE, DEGREE_0,
+          GST_TYPE_TIZEN_WL_SINK_ROTATE_ANGLE, DEGREE_0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_DISPLAY_GEOMETRY_METHOD,
       g_param_spec_enum ("display-geometry-method", "Display geometry method",
           "Geometrical method for display",
-          GST_TYPE_WAYLANDSINK_DISPLAY_GEOMETRY_METHOD,
+          GST_TYPE_TIZEN_WL_SINK_DISPLAY_GEOMETRY_METHOD,
           DEF_DISPLAY_GEOMETRY_METHOD,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_FLIP,
       g_param_spec_enum ("flip", "Display flip",
           "Flip for display",
-          GST_TYPE_WAYLANDSINK_FLIP, DEF_DISPLAY_FLIP,
+          GST_TYPE_TIZEN_WL_SINK_FLIP, DEF_DISPLAY_FLIP,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_VISIBLE,
@@ -469,13 +471,13 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
 
   gst_waylandsink_signals[SIGNAL_HANDOFF] =
       g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
-      G_STRUCT_OFFSET (GstWaylandSinkClass, handoff), NULL, NULL,
+      G_STRUCT_OFFSET (GstTizenWlSinkClass, handoff), NULL, NULL,
       g_cclosure_marshal_generic, G_TYPE_NONE, 2,
       GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE, GST_TYPE_PAD);
 
   gst_waylandsink_signals[SIGNAL_PREROLL_HANDOFF] =
       g_signal_new ("preroll-handoff", G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstWaylandSinkClass, preroll_handoff),
+      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstTizenWlSinkClass, preroll_handoff),
       NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2,
       GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE, GST_TYPE_PAD);
 
@@ -483,7 +485,7 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
 }
 
 static void
-gst_wayland_sink_dump_raw_video (GstWaylandSink * sink, GstBuffer * buffer,
+gst_tizen_wl_sink_dump_raw_video (GstTizenWlSink * sink, GstBuffer * buffer,
     guint dump_count, guint dump_total)
 {
   GstMemory *mem;
@@ -507,7 +509,7 @@ gst_wayland_sink_dump_raw_video (GstWaylandSink * sink, GstBuffer * buffer,
   data = mem_info.data;
   snprintf (file_name, sizeof (file_name), "/tmp/WLSINK_OUT_DUMP_%2.2d.dump",
       dump_count);
-  ret = gst_wl_fwrite_data (file_name, data, size);
+  ret = gst_tizen_wl_fwrite_data (file_name, data, size);
   if (ret) {
     GST_ERROR ("_write_rawdata() failed");
   }
@@ -517,7 +519,7 @@ gst_wayland_sink_dump_raw_video (GstWaylandSink * sink, GstBuffer * buffer,
 }
 
 static void
-gst_wayland_sink_init (GstWaylandSink * sink)
+gst_tizen_wl_sink_init (GstTizenWlSink * sink)
 {
   FUNCTION;
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
@@ -549,9 +551,9 @@ gst_wayland_sink_init (GstWaylandSink * sink)
 
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 static void
-gst_wayland_sink_recover_display_window_info (GstWaylandSink * sink)
+gst_tizen_wl_sink_recover_display_window_info (GstTizenWlSink * sink)
 {
-  GstWlShmAllocator *self = NULL;
+  GstTizenWlShmAllocator *self = NULL;
   FUNCTION;
   g_return_if_fail (sink != NULL);
   g_return_if_fail (sink->display != NULL);
@@ -559,15 +561,15 @@ gst_wayland_sink_recover_display_window_info (GstWaylandSink * sink)
 
   sink->display->USE_TBM = sink->USE_TBM;
   sink->display->is_native_format = sink->is_native_format;
-  self = GST_WL_SHM_ALLOCATOR (gst_wl_shm_allocator_get ());
+  self = GST_TIZEN_WL_SHM_ALLOCATOR (gst_tizen_wl_shm_allocator_get ());
   self->display = sink->display;
 
-  gst_wayland_sink_update_window_geometry (sink);
+  gst_tizen_wl_sink_update_window_geometry (sink);
   sink->video_info_changed = TRUE;
 }
 
 static gboolean
-gst_wayland_sink_is_disabled_overlay (GstWaylandSink * sink)
+gst_tizen_wl_sink_is_disabled_overlay (GstTizenWlSink * sink)
 {
   g_return_val_if_fail (sink != NULL, FALSE);
   //Ensure display is null and the display info has been copied by unsetting disable_overlay
@@ -580,7 +582,7 @@ gst_wayland_sink_is_disabled_overlay (GstWaylandSink * sink)
 }
 
 static void
-gst_wayland_sink_stop_video (GstWaylandSink * sink)
+gst_tizen_wl_sink_stop_video (GstTizenWlSink * sink)
 {
   FUNCTION;
   g_return_if_fail (sink != NULL);
@@ -588,7 +590,7 @@ gst_wayland_sink_stop_video (GstWaylandSink * sink)
 }
 
 static int
-gst_wayland_sink_is_gapless (GstWaylandSink * sink)
+gst_tizen_wl_sink_is_gapless (GstTizenWlSink * sink)
 {
   g_return_val_if_fail (sink != NULL, FALSE);
   g_return_val_if_fail (sink->display != NULL, FALSE);
@@ -601,12 +603,12 @@ gst_wayland_sink_is_gapless (GstWaylandSink * sink)
 }
 
 static int
-gst_wayland_sink_need_flush_buffer (GstWaylandSink * sink)
+gst_tizen_wl_sink_need_flush_buffer (GstTizenWlSink * sink)
 {
   g_return_val_if_fail (sink != NULL, FALSE);
   g_return_val_if_fail (sink->display != NULL, FALSE);
 
-  if ((gst_wayland_sink_is_gapless (sink))
+  if ((gst_tizen_wl_sink_is_gapless (sink))
       || sink->request_camera_flush_buf || sink->display->flush_request == 1) {
     sink->display->flush_request = TRUE;
     return TRUE;
@@ -615,7 +617,7 @@ gst_wayland_sink_need_flush_buffer (GstWaylandSink * sink)
 }
 
 static void
-gst_wayland_sink_update_last_buffer_geometry (GstWaylandSink * sink)
+gst_tizen_wl_sink_update_last_buffer_geometry (GstTizenWlSink * sink)
 {
   GstWlBuffer *wlbuffer;
   gboolean no_render_buffer = FALSE;
@@ -666,7 +668,7 @@ gst_wayland_sink_update_last_buffer_geometry (GstWaylandSink * sink)
 
 #ifdef USE_WL_FLUSH_BUFFER
 static int
-gst_wayland_sink_make_flush_buffer (GstWlDisplay * display,
+gst_tizen_wl_sink_make_flush_buffer (GstWlDisplay * display,
     MMVideoBuffer * mm_video_buf)
 {
   GstWlFlushBuffer *flush_buffer = NULL;
@@ -737,8 +739,8 @@ gst_wayland_sink_make_flush_buffer (GstWlDisplay * display,
 }
 
 static int
-gst_wayland_sink_copy_mm_video_buf_info_to_flush_buffer (GstWlDisplay * display,
-    MMVideoBuffer * mm_video_buf)
+gst_tizen_wl_sink_copy_mm_video_buf_info_to_flush_buffer (GstWlDisplay *
+    display, MMVideoBuffer * mm_video_buf)
 {
   int ret = FALSE;
   g_return_val_if_fail (display != NULL, FALSE);
@@ -747,7 +749,7 @@ gst_wayland_sink_copy_mm_video_buf_info_to_flush_buffer (GstWlDisplay * display,
 
   display->plane_num = mm_video_buf->plane_num;
   display->tbm_bo_num = mm_video_buf->handle_num;
-  ret = gst_wayland_sink_make_flush_buffer (display, mm_video_buf);
+  ret = gst_tizen_wl_sink_make_flush_buffer (display, mm_video_buf);
   if (ret) {
     int i;
     for (i = 0; i < display->plane_num; i++) {
@@ -777,7 +779,7 @@ gst_wayland_sink_copy_mm_video_buf_info_to_flush_buffer (GstWlDisplay * display,
 #endif
 
 static void
-gst_wayland_sink_add_mm_video_buf_info (GstWlDisplay * display,
+gst_tizen_wl_sink_add_mm_video_buf_info (GstWlDisplay * display,
     MMVideoBuffer * mm_video_buf)
 {
   int i;
@@ -809,7 +811,7 @@ gst_wayland_sink_add_mm_video_buf_info (GstWlDisplay * display,
 }
 
 static MMVideoBuffer *
-gst_wayland_sink_get_mm_video_buf (GstBuffer * buffer)
+gst_tizen_wl_sink_get_mm_video_buf (GstBuffer * buffer)
 {
   GstMemory *mem;
   GstMapInfo mem_info = GST_MAP_INFO_INIT;
@@ -841,7 +843,7 @@ gst_wayland_sink_get_mm_video_buf (GstBuffer * buffer)
 }
 
 static int
-gst_wayland_sink_get_mm_video_buf_info (GstWaylandSink * sink,
+gst_tizen_wl_sink_get_mm_video_buf_info (GstTizenWlSink * sink,
     GstBuffer * buffer)
 {
   GstWlDisplay *display;
@@ -855,7 +857,7 @@ gst_wayland_sink_get_mm_video_buf_info (GstWaylandSink * sink,
   g_return_val_if_fail (sink->display != NULL, FALSE);
 
   /* get MMVideoBuffer from buffer */
-  mm_video_buf = gst_wayland_sink_get_mm_video_buf (buffer);
+  mm_video_buf = gst_tizen_wl_sink_get_mm_video_buf (buffer);
   g_return_val_if_fail (mm_video_buf != NULL, FALSE);
 
   /* assign mm_video_buf info */
@@ -864,16 +866,16 @@ gst_wayland_sink_get_mm_video_buf_info (GstWaylandSink * sink,
   display->flush_request = mm_video_buf->flush_request;
   GST_DEBUG ("flush_request value is %d", display->flush_request);
 #ifdef USE_WL_FLUSH_BUFFER
-  if (gst_wayland_sink_need_flush_buffer (sink)) {
+  if (gst_tizen_wl_sink_need_flush_buffer (sink)) {
     /* Sometimes there isn't video data in MMVideoBuffer from buffer
        when flush_request is true */
     if (mm_video_buf->flush_request && !mm_video_buf->size[0]
         && sink->last_buffer) {
       /* replace MMVideoBuffer from last buffer */
-      mm_video_buf = gst_wayland_sink_get_mm_video_buf (sink->last_buffer);
+      mm_video_buf = gst_tizen_wl_sink_get_mm_video_buf (sink->last_buffer);
       g_return_val_if_fail (mm_video_buf != NULL, FALSE);
     }
-    if (!gst_wayland_sink_copy_mm_video_buf_info_to_flush_buffer (display,
+    if (!gst_tizen_wl_sink_copy_mm_video_buf_info_to_flush_buffer (display,
             mm_video_buf)) {
       GST_ERROR ("cat not copy mm_video_buf info to flush");
       return FALSE;
@@ -881,25 +883,25 @@ gst_wayland_sink_get_mm_video_buf_info (GstWaylandSink * sink,
   } else
 #endif
     /* normal routine */
-    gst_wayland_sink_add_mm_video_buf_info (display, mm_video_buf);
+    gst_tizen_wl_sink_add_mm_video_buf_info (display, mm_video_buf);
 
   return TRUE;
 }
 
 static void
-gst_wayland_sink_render_flush_buffer (GstBaseSink * bsink)
+gst_tizen_wl_sink_render_flush_buffer (GstBaseSink * bsink)
 {
-  GstWaylandSink *sink;
-  sink = GST_WAYLAND_SINK (bsink);
+  GstTizenWlSink *sink;
+  sink = GST_TIZEN_WL_SINK (bsink);
   FUNCTION;
   g_return_if_fail (sink != NULL);
   g_return_if_fail (sink->last_buffer != NULL);
 
-  gst_wayland_sink_render (bsink, sink->last_buffer);
+  gst_tizen_wl_sink_render (bsink, sink->last_buffer);
 }
 
 static void
-gst_wayland_sink_render_last_sample (GstWaylandSink * sink)
+gst_tizen_wl_sink_render_last_sample (GstTizenWlSink * sink)
 {
   GstSample *last_sample = NULL;
   GstBuffer *last_buffer = NULL;
@@ -912,7 +914,7 @@ gst_wayland_sink_render_last_sample (GstWaylandSink * sink)
     if (last_buffer) {
       GST_LOG ("PAUSED state : last buffer %p", last_buffer);
       gst_buffer_ref (last_buffer);
-      gst_wayland_sink_render (GST_BASE_SINK (sink), last_buffer);
+      gst_tizen_wl_sink_render (GST_BASE_SINK (sink), last_buffer);
       gst_buffer_unref (last_buffer);
       last_buffer = NULL;
     }
@@ -924,10 +926,10 @@ gst_wayland_sink_render_last_sample (GstWaylandSink * sink)
 #endif
 
 static void
-gst_wayland_sink_get_property (GObject * object,
+gst_tizen_wl_sink_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (object);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (object);
   FUNCTION;
 
   switch (prop_id) {
@@ -1022,10 +1024,10 @@ gst_wayland_sink_get_property (GObject * object,
 }
 
 static void
-gst_wayland_sink_set_property (GObject * object,
+gst_tizen_wl_sink_set_property (GObject * object,
     guint prop_id, const GValue * value, GParamSpec * pspec)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (object);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (object);
   FUNCTION;
   g_mutex_lock (&sink->render_lock);
 
@@ -1055,7 +1057,7 @@ gst_wayland_sink_set_property (GObject * object,
           g_clear_object (&sink->window);
           g_clear_object (&sink->display);
         } else
-          gst_wayland_sink_recover_display_window_info (sink);
+          gst_tizen_wl_sink_recover_display_window_info (sink);
       }
       break;
     case PROP_SIGNAL_HANDOFFS:
@@ -1073,13 +1075,13 @@ gst_wayland_sink_set_property (GObject * object,
                   sink->last_buffer, GST_BASE_SINK (object)->sinkpad);
             }
           }
-          gst_wayland_sink_stop_video (sink);
+          gst_tizen_wl_sink_stop_video (sink);
         } else {
           if (GST_STATE (sink) == GST_STATE_PAUSED) {
             g_mutex_unlock (&sink->render_lock);
             /* scenario: inline video mode->paused->fullscreen mode->signal_handoffs(0)
                we need to update preroll buffer on wayland surface */
-            gst_wayland_sink_render_last_sample (sink);
+            gst_tizen_wl_sink_render_last_sample (sink);
             g_mutex_lock (&sink->render_lock);
           }
         }
@@ -1136,7 +1138,7 @@ gst_wayland_sink_set_property (GObject * object,
       } else if (!sink->visible && GST_STATE (sink) >= GST_STATE_PAUSED) {
         /* video stop */
         if (sink->window) {
-          gst_wayland_sink_stop_video (sink);
+          gst_tizen_wl_sink_stop_video (sink);
         }
       }
       break;
@@ -1296,7 +1298,7 @@ gst_wayland_sink_set_property (GObject * object,
   if (sink->video_info_changed && sink->window) {
     gst_wl_window_set_video_info_change (sink->window, TRUE);
     if (GST_STATE (sink) == GST_STATE_PAUSED)
-      gst_wayland_sink_update_last_buffer_geometry (sink);
+      gst_tizen_wl_sink_update_last_buffer_geometry (sink);
   }
 #endif
   g_mutex_unlock (&sink->render_lock);
@@ -1304,9 +1306,9 @@ gst_wayland_sink_set_property (GObject * object,
 }
 
 static void
-gst_wayland_sink_finalize (GObject * object)
+gst_tizen_wl_sink_finalize (GObject * object)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (object);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (object);
   FUNCTION;
   GST_DEBUG_OBJECT (sink, "Finalizing the sink..");
 
@@ -1330,12 +1332,12 @@ gst_wayland_sink_finalize (GObject * object)
 
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 static gboolean
-gst_wayland_sink_event (GstBaseSink * bsink, GstEvent * event)
+gst_tizen_wl_sink_event (GstBaseSink * bsink, GstEvent * event)
 {
-  GstWaylandSink *sink;
+  GstTizenWlSink *sink;
   const GstStructure *s;
 
-  sink = GST_WAYLAND_SINK (bsink);
+  sink = GST_TIZEN_WL_SINK (bsink);
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_EOS:
@@ -1351,8 +1353,8 @@ gst_wayland_sink_event (GstBaseSink * bsink, GstEvent * event)
           gst_structure_get_name (s), GST_STATE (sink));
 
       sink->got_costum_event = TRUE;
-      if (gst_wayland_sink_is_gapless (sink)) {
-        gst_wayland_sink_render_flush_buffer (bsink);
+      if (gst_tizen_wl_sink_is_gapless (sink)) {
+        gst_tizen_wl_sink_render_flush_buffer (bsink);
         sink->got_costum_event = FALSE;
       }
       sink->got_costum_event = FALSE;
@@ -1364,13 +1366,13 @@ gst_wayland_sink_event (GstBaseSink * bsink, GstEvent * event)
 }
 
 static void
-gst_wayland_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+gst_tizen_wl_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
     GstClockTime * start, GstClockTime * end)
 {
   /* If basesink need to drop buffer, basesink ask waylandsink to start and end */
-  GstWaylandSink *sink;
+  GstTizenWlSink *sink;
 
-  sink = GST_WAYLAND_SINK (bsink);
+  sink = GST_TIZEN_WL_SINK (bsink);
 
   if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
     *start = GST_BUFFER_TIMESTAMP (buf);
@@ -1390,7 +1392,7 @@ gst_wayland_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
 #if 0
 /* must be called with the display_lock */
 static void
-gst_wayland_sink_set_display_from_context (GstWaylandSink * sink,
+gst_tizen_wl_sink_set_display_from_context (GstTizenWlSink * sink,
     GstContext * context)
 {
   struct wl_display *display;
@@ -1412,11 +1414,13 @@ gst_wayland_sink_set_display_from_context (GstWaylandSink * sink,
 }
 #endif
 static gboolean
-gst_wayland_sink_find_display (GstWaylandSink * sink)
+gst_tizen_wl_sink_find_display (GstTizenWlSink * sink)
 {
-//  GstQuery *query;
-//  GstMessage *msg;
-//  GstContext *context = NULL;
+#if  0
+  GstQuery *query;
+  GstMessage *msg;
+  GstContext *context = NULL;
+#endif
   GError *error = NULL;
   gboolean ret = TRUE;
   FUNCTION;
@@ -1429,7 +1433,7 @@ gst_wayland_sink_find_display (GstWaylandSink * sink)
     query = gst_query_new_context (GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE);
     if (gst_pad_peer_query (GST_VIDEO_SINK_PAD (sink), query)) {
       gst_query_parse_context (query, &context);
-      gst_wayland_sink_set_display_from_context (sink, context);
+      gst_tizen_wl_sink_set_display_from_context (sink, context);
     }
     gst_query_unref (query);
 #endif
@@ -1441,7 +1445,7 @@ gst_wayland_sink_find_display (GstWaylandSink * sink)
 
       g_mutex_unlock (&sink->display_lock);
       gst_element_post_message (GST_ELEMENT_CAST (sink), msg);
-      /* at this point we expect gst_wayland_sink_set_context
+      /* at this point we expect gst_tizen_wl_sink_set_context
        * to get called and fill sink->display */
       g_mutex_lock (&sink->display_lock);
 #endif
@@ -1472,16 +1476,16 @@ gst_wayland_sink_find_display (GstWaylandSink * sink)
 }
 
 static GstStateChangeReturn
-gst_wayland_sink_change_state (GstElement * element, GstStateChange transition)
+gst_tizen_wl_sink_change_state (GstElement * element, GstStateChange transition)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (element);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (element);
   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
   FUNCTION;
 
   switch (transition) {
     case GST_STATE_CHANGE_NULL_TO_READY:
       GST_LOG ("WAYLANDSINK TRANSITION: NULL_TO_READY");
-      if (!gst_wayland_sink_find_display (sink))
+      if (!gst_tizen_wl_sink_find_display (sink))
         return GST_STATE_CHANGE_FAILURE;
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
@@ -1513,7 +1517,7 @@ gst_wayland_sink_change_state (GstElement * element, GstStateChange transition)
                 && !sink->display->flush_buffer) {
               /* To avoid duplicate request by App, check flush_buffer by flush_request of MMVideoBuffer */
               sink->request_camera_flush_buf = TRUE;
-              gst_wayland_sink_render_flush_buffer (bsink);
+              gst_tizen_wl_sink_render_flush_buffer (bsink);
               sink->request_camera_flush_buf = FALSE;
             }
             break;
@@ -1558,18 +1562,19 @@ gst_wayland_sink_change_state (GstElement * element, GstStateChange transition)
 
   return ret;
 }
+
 #if 0
 static void
-gst_wayland_sink_set_context (GstElement * element, GstContext * context)
+gst_tizen_wl_sink_set_context (GstElement * element, GstContext * context)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (element);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (element);
   FUNCTION;
 
   if (gst_context_has_context_type (context,
           GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE)) {
     g_mutex_lock (&sink->display_lock);
     if (G_LIKELY (!sink->display))
-      gst_wayland_sink_set_display_from_context (sink, context);
+      gst_tizen_wl_sink_set_display_from_context (sink, context);
     else {
       GST_WARNING_OBJECT (element, "changing display handle is not supported");
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
@@ -1585,13 +1590,13 @@ gst_wayland_sink_set_context (GstElement * element, GstContext * context)
 }
 #endif
 static GstCaps *
-gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
+gst_tizen_wl_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
 {
-  GstWaylandSink *sink;
+  GstTizenWlSink *sink;
   GstCaps *caps;
   FUNCTION;
 
-  sink = GST_WAYLAND_SINK (bsink);
+  sink = GST_TIZEN_WL_SINK (bsink);
 
   caps = gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (sink));
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
@@ -1685,9 +1690,9 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
 }
 
 static gboolean
-gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+gst_tizen_wl_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
 {
-  GstWaylandSink *sink;
+  GstTizenWlSink *sink;
   GstBufferPool *newpool;
   GstVideoInfo info;
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
@@ -1698,11 +1703,11 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
   GArray *formats;
   gint i;
   GstStructure *structure;
-  GstWlShmAllocator *self = NULL;
+  GstTizenWlShmAllocator *self = NULL;
 
   FUNCTION;
 
-  sink = GST_WAYLAND_SINK (bsink);
+  sink = GST_TIZEN_WL_SINK (bsink);
 
   GST_DEBUG_OBJECT (sink, "set caps %" GST_PTR_FORMAT, caps);
 
@@ -1775,7 +1780,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
       sink->video_info_changed = TRUE;
     } else {
       sink->display->is_native_format = FALSE;
-      self = GST_WL_SHM_ALLOCATOR (gst_wl_shm_allocator_get ());
+      self = GST_TIZEN_WL_SHM_ALLOCATOR (gst_tizen_wl_shm_allocator_get ());
       self->display = sink->display;
       /* create a new pool for the new configuration */
       newpool = gst_video_buffer_pool_new ();
@@ -1785,7 +1790,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
       structure = gst_buffer_pool_get_config (newpool);
       gst_buffer_pool_config_set_params (structure, caps, info.size, 6, 0);
       gst_buffer_pool_config_set_allocator (structure,
-          gst_wl_shm_allocator_get (), NULL);
+          gst_tizen_wl_shm_allocator_get (), NULL);
       if (!gst_buffer_pool_set_config (newpool, structure))
         goto config_failed;
 
@@ -1798,7 +1803,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
     }
   } else {                      /* USE SHM */
 
-    self = GST_WL_SHM_ALLOCATOR (gst_wl_shm_allocator_get ());
+    self = GST_TIZEN_WL_SHM_ALLOCATOR (gst_tizen_wl_shm_allocator_get ());
     self->display = sink->display;
 
     /* create a new pool for the new configuration */
@@ -1809,7 +1814,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
     structure = gst_buffer_pool_get_config (newpool);
     gst_buffer_pool_config_set_params (structure, caps, info.size, 6, 0);
     gst_buffer_pool_config_set_allocator (structure,
-        gst_wl_shm_allocator_get (), NULL);
+        gst_tizen_wl_shm_allocator_get (), NULL);
     if (!gst_buffer_pool_set_config (newpool, structure))
       goto config_failed;
 
@@ -1824,7 +1829,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
   sink->is_native_format = sink->display->is_native_format;
 
   if (sink->window)
-    gst_wayland_sink_update_window_geometry (sink);
+    gst_tizen_wl_sink_update_window_geometry (sink);
 
 
 #else /*open source */
@@ -1836,7 +1841,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
   structure = gst_buffer_pool_get_config (newpool);
   gst_buffer_pool_config_set_params (structure, caps, info.size, 6, 0);
   gst_buffer_pool_config_set_allocator (structure,
-      gst_wl_shm_allocator_get (), NULL);
+      gst_tizen_wl_shm_allocator_get (), NULL);
   if (!gst_buffer_pool_set_config (newpool, structure))
     goto config_failed;
 
@@ -1885,9 +1890,9 @@ config_failed:
 }
 
 static gboolean
-gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
+gst_tizen_wl_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (bsink);
   GstStructure *config;
   guint size, min_bufs, max_bufs;
 
@@ -1914,7 +1919,8 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
   /* we do have a pool for sure (created in set_caps),
    * so let's propose it anyway, but also propose the allocator on its own */
   gst_query_add_allocation_pool (query, sink->pool, size, min_bufs, max_bufs);
-  gst_query_add_allocation_param (query, gst_wl_shm_allocator_get (), NULL);
+  gst_query_add_allocation_param (query, gst_tizen_wl_shm_allocator_get (),
+      NULL);
 
   gst_structure_free (config);
 
@@ -1922,10 +1928,10 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
 }
 
 static GstFlowReturn
-gst_wayland_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer)
+gst_tizen_wl_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer)
 {
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-  GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (bsink);
   FUNCTION;
 
   GST_DEBUG_OBJECT (bsink, "preroll buffer %p", buffer);
@@ -1939,13 +1945,13 @@ gst_wayland_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer)
     return GST_FLOW_OK;
   }
 #endif
-  return gst_wayland_sink_render (bsink, buffer);
+  return gst_tizen_wl_sink_render (bsink, buffer);
 }
 
 static void
 frame_redraw_callback (void *data, struct wl_callback *callback, uint32_t time)
 {
-  GstWaylandSink *sink = data;
+  GstTizenWlSink *sink = data;
   FUNCTION;
 
   GST_LOG ("frame_redraw_cb");
@@ -1961,7 +1967,7 @@ static const struct wl_callback_listener frame_callback_listener = {
 
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 static void
-gst_wayland_sink_update_window_geometry (GstWaylandSink * sink)
+gst_tizen_wl_sink_update_window_geometry (GstTizenWlSink * sink)
 {
   FUNCTION;
   g_return_if_fail (sink != NULL);
@@ -1995,7 +2001,7 @@ gst_wayland_sink_update_window_geometry (GstWaylandSink * sink)
 #endif
 /* must be called with the render lock */
 static void
-render_last_buffer (GstWaylandSink * sink)
+render_last_buffer (GstTizenWlSink * sink)
 {
   GstWlBuffer *wlbuffer;
   const GstVideoInfo *info = NULL;
@@ -2017,7 +2023,7 @@ render_last_buffer (GstWaylandSink * sink)
 
   /* frame_callback_listener is called when wayland-client finish rendering the wl_buffer */
   GST_INFO
-      ("wl_callback_add_listener (wl_callback@%p, wl_callback_listener@%p, GstWaylandSink@%p)",
+      ("wl_callback_add_listener (wl_callback@%p, wl_callback_listener@%p, GstTizenWlSink@%p)",
       callback, &frame_callback_listener, sink);
   wl_callback_add_listener (callback, &frame_callback_listener, sink);
 
@@ -2033,7 +2039,7 @@ render_last_buffer (GstWaylandSink * sink)
 
 
 static gboolean
-gst_wayland_sink_has_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
+gst_tizen_wl_sink_has_wlbuffer (GstTizenWlSink * sink, GstBuffer * buffer)
 {
   GstWlBuffer *gstwlbuffer;
   FUNCTION;
@@ -2042,7 +2048,7 @@ gst_wayland_sink_has_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
 
   gstwlbuffer = gst_buffer_get_wl_buffer (buffer);
   if (gstwlbuffer && gstwlbuffer->display == sink->display
-      && !gst_wayland_sink_is_gapless (sink)
+      && !gst_tizen_wl_sink_is_gapless (sink)
       && !sink->request_camera_flush_buf) {
     /* gstbuffer has wlbuffer */
     /* e.g) last_buffer, buffer is created by previous plugin or waylandsink with BufferPool */
@@ -2055,7 +2061,7 @@ gst_wayland_sink_has_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
 }
 
 static GstFlowReturn
-gst_wayland_sink_no_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
+gst_tizen_wl_sink_no_create_wlbuffer (GstTizenWlSink * sink, GstBuffer * buffer)
 {
   GstMemory *mem;
   MMVideoBuffer *mm_video_buf = NULL;
@@ -2067,7 +2073,7 @@ gst_wayland_sink_no_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
   /* the last_buffer for flushing has wlbuffer or
      buffer is created by previous plugins or waylandsink has wlbuffer */
   mem = gst_buffer_peek_memory (buffer, 0);
-  if (gst_is_wl_memory (mem)) {
+  if (gst_is_tizen_wl_memory (mem)) {
     GST_LOG ("buffer(%p) is created by waylandsink has a wl_buffer, "
         "writing directly", buffer);
   } else {
@@ -2076,7 +2082,7 @@ gst_wayland_sink_no_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
         "writing directly", buffer);
     GST_LOG ("previous plugins must manage buffer index well");
     /* check MMVideoBuffer */
-    mm_video_buf = gst_wayland_sink_get_mm_video_buf (buffer);
+    mm_video_buf = gst_tizen_wl_sink_get_mm_video_buf (buffer);
     if (mm_video_buf != NULL) {
       GST_LOG ("GstBuffer(%p) has MMVideoBuffer(%p)", buffer, mm_video_buf);
     } else {
@@ -2089,14 +2095,14 @@ gst_wayland_sink_no_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
   sink->to_render = buffer;
 
   if (sink->dump_video && !sink->display->is_native_format)
-    gst_wayland_sink_dump_raw_video (sink, sink->to_render,
+    gst_tizen_wl_sink_dump_raw_video (sink, sink->to_render,
         sink->display->dump_count++, sink->total_dump);
 
   return ret;
 }
 
 static void
-gst_wayland_sink_create_wlbuffer_with_wl_mem (GstWaylandSink * sink,
+gst_tizen_wl_sink_create_wlbuffer_with_wl_mem (GstTizenWlSink * sink,
     GstBuffer * buffer)
 {
   GstMemory *mem;
@@ -2108,7 +2114,7 @@ gst_wayland_sink_create_wlbuffer_with_wl_mem (GstWaylandSink * sink,
   GST_LOG ("gstbuffer(%p) is created by wayland has not wlbuffer", buffer);
   mem = gst_buffer_peek_memory (buffer, 0);
   wbuf =
-      gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+      gst_tizen_wl_shm_memory_construct_wl_buffer (mem, sink->display,
       &sink->video_info);
   if (wbuf) {
     gst_buffer_add_wl_buffer (buffer, wbuf, sink->display);
@@ -2117,7 +2123,7 @@ gst_wayland_sink_create_wlbuffer_with_wl_mem (GstWaylandSink * sink,
 }
 
 static GstFlowReturn
-gst_wayland_sink_create_wlbuffer_with_previous_plugin_tbm (GstWaylandSink *
+gst_tizen_wl_sink_create_wlbuffer_with_previous_plugin_tbm (GstTizenWlSink *
     sink, GstBuffer * buffer)
 {
   GstMemory *mem;
@@ -2134,7 +2140,7 @@ gst_wayland_sink_create_wlbuffer_with_previous_plugin_tbm (GstWaylandSink *
       buffer);
   GST_LOG ("Use native format with previous plugins TBM");
   /* in case of native format (SN12, ST12, SN21, SR32 and S420) */
-  if (!gst_wayland_sink_get_mm_video_buf_info (sink, buffer)) {
+  if (!gst_tizen_wl_sink_get_mm_video_buf_info (sink, buffer)) {
     return GST_FLOW_ERROR;
   }
 
@@ -2143,7 +2149,7 @@ gst_wayland_sink_create_wlbuffer_with_previous_plugin_tbm (GstWaylandSink *
   if (G_UNLIKELY (!wlbuffer) || sink->display->flush_request) {
     mem = gst_buffer_peek_memory (buffer, 0);
     wbuf =
-        gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+        gst_tizen_wl_shm_memory_construct_wl_buffer (mem, sink->display,
         &sink->video_info);
     if (G_UNLIKELY (!wbuf)) {
       GST_ERROR ("could not create wl_buffer");
@@ -2161,12 +2167,12 @@ gst_wayland_sink_create_wlbuffer_with_previous_plugin_tbm (GstWaylandSink *
 }
 
 static GstFlowReturn
-    gst_wayland_sink_copy_input_gstbuffer_to_wl_gstbuffer_with_wl_mem
-    (GstWaylandSink * sink, GstBuffer * buffer)
+    gst_tizen_wl_sink_copy_input_gstbuffer_to_wl_gstbuffer_with_wl_mem
+    (GstTizenWlSink * sink, GstBuffer * buffer)
 {
   GstWlBuffer *wlbuffer;
   GstMemory *mem;
-  GstWlShmMemory *shm_mem;
+  GstTizenWlShmMemory *shm_mem;
   GstMapInfo src;
   struct wl_buffer *wbuf = NULL;
   GstFlowReturn ret = GST_FLOW_OK;
@@ -2193,10 +2199,10 @@ static GstFlowReturn
   wlbuffer = gst_buffer_get_wl_buffer (buffer);
   if (G_UNLIKELY (!wlbuffer)) {
     mem = gst_buffer_peek_memory (sink->to_render, 0);
-    shm_mem = (GstWlShmMemory *) mem;
+    shm_mem = (GstTizenWlShmMemory *) mem;
     GST_LOG ("to_render(%p), shm_mem->fd(%d)", sink->to_render, shm_mem->fd);
     wbuf =
-        gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+        gst_tizen_wl_shm_memory_construct_wl_buffer (mem, sink->display,
         &sink->video_info);
     if (G_UNLIKELY (!wbuf)) {
       GST_ERROR ("could not create wl_buffer out of wl memory");
@@ -2213,7 +2219,7 @@ static GstFlowReturn
 }
 
 static GstFlowReturn
-gst_wayland_sink_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
+gst_tizen_wl_sink_create_wlbuffer (GstTizenWlSink * sink, GstBuffer * buffer)
 {
   GstMemory *mem;
   GstFlowReturn ret = GST_FLOW_OK;
@@ -2223,24 +2229,24 @@ gst_wayland_sink_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
 
   sink->to_render = NULL;
 
-  if (gst_wayland_sink_has_wlbuffer (sink, buffer)) {
-    ret = gst_wayland_sink_no_create_wlbuffer (sink, buffer);
+  if (gst_tizen_wl_sink_has_wlbuffer (sink, buffer)) {
+    ret = gst_tizen_wl_sink_no_create_wlbuffer (sink, buffer);
   } else {
     mem = gst_buffer_peek_memory (buffer, 0);
-    if (gst_is_wl_memory (mem)) {
+    if (gst_is_tizen_wl_memory (mem)) {
       /* SHM or TBM */
-      gst_wayland_sink_create_wlbuffer_with_wl_mem (sink, buffer);
+      gst_tizen_wl_sink_create_wlbuffer_with_wl_mem (sink, buffer);
     } else {
       /* gstbuffer is not wl memory */
       if (sink->USE_TBM && sink->display->is_native_format) {
         /* Use tbm of buffer directly */
         ret =
-            gst_wayland_sink_create_wlbuffer_with_previous_plugin_tbm (sink,
+            gst_tizen_wl_sink_create_wlbuffer_with_previous_plugin_tbm (sink,
             buffer);
       } else {
         /* Copy virtual addr to wayland SHM or TBM */
         ret =
-            gst_wayland_sink_copy_input_gstbuffer_to_wl_gstbuffer_with_wl_mem
+            gst_tizen_wl_sink_copy_input_gstbuffer_to_wl_gstbuffer_with_wl_mem
             (sink, buffer);
       }
     }
@@ -2249,7 +2255,7 @@ gst_wayland_sink_create_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
 }
 
 static void
-gst_wayland_sink_buffer_replace (GstWaylandSink * sink, GstBuffer * buffer)
+gst_tizen_wl_sink_buffer_replace (GstTizenWlSink * sink, GstBuffer * buffer)
 {
   FUNCTION;
   g_return_if_fail (sink != NULL);
@@ -2281,7 +2287,7 @@ gst_wayland_sink_buffer_replace (GstWaylandSink * sink, GstBuffer * buffer)
 }
 
 static void
-gst_wayland_sink_get_window (GstWaylandSink * sink)
+gst_tizen_wl_sink_get_window (GstTizenWlSink * sink)
 {
   g_return_if_fail (sink != NULL);
   FUNCTION;
@@ -2297,15 +2303,15 @@ gst_wayland_sink_get_window (GstWaylandSink * sink)
     sink->window =
         gst_wl_window_new_toplevel (sink->display, &sink->video_info);
   }
-  gst_wayland_sink_update_window_geometry (sink);
+  gst_tizen_wl_sink_update_window_geometry (sink);
 }
 
 static GstFlowReturn
-gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
+gst_tizen_wl_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
 {
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 
-  GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (bsink);
   GstFlowReturn ret = GST_FLOW_OK;
   FUNCTION;
 
@@ -2315,14 +2321,14 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
       GST_OBJECT_REFCOUNT_VALUE (buffer));
 
   /* check overlay */
-  if (gst_wayland_sink_is_disabled_overlay (sink)) {
+  if (gst_tizen_wl_sink_is_disabled_overlay (sink)) {
     GST_LOG ("set disable_overlay, so skip");
     goto done;
   }
 
   /* check window */
   if (G_UNLIKELY (!sink->window)) {
-    gst_wayland_sink_get_window (sink);
+    gst_tizen_wl_sink_get_window (sink);
   }
 
   /* fakesink function for media stream callback case */
@@ -2335,11 +2341,11 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
 
   /* drop buffers until we get a frame callback */
   if (g_atomic_int_get (&sink->redraw_pending) == TRUE
-      && !gst_wayland_sink_is_gapless (sink))
+      && !gst_tizen_wl_sink_is_gapless (sink))
     goto done;
 
   /* create wl_buffer */
-  ret = gst_wayland_sink_create_wlbuffer (sink, buffer);
+  ret = gst_tizen_wl_sink_create_wlbuffer (sink, buffer);
   if (ret != GST_FLOW_OK)
     goto done;
 
@@ -2351,7 +2357,7 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
   }
 
   /* replace last_buffer */
-  gst_wayland_sink_buffer_replace (sink, buffer);
+  gst_tizen_wl_sink_buffer_replace (sink, buffer);
 
   /* rendering */
   if (sink->visible) {
@@ -2369,7 +2375,7 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
 
 #else /* open source */
 
-  GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (bsink);
   GstBuffer *to_render = NULL;
   GstFlowReturn ret = GST_FLOW_OK;
 
@@ -2391,7 +2397,7 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
 
   /* drop buffers until we get a frame callback */
   if (g_atomic_int_get (&sink->redraw_pending) == TRUE
-      && !gst_wayland_sink_is_gapless (sink))
+      && !gst_tizen_wl_sink_is_gapless (sink))
     goto done;
 
   /* make sure that the application has called set_render_rectangle() */
@@ -2417,7 +2423,7 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
     mem = gst_buffer_peek_memory (buffer, 0);
     if (gst_is_wl_shm_memory (mem)) {   /* is wayland memory */
       FUNCTION;
-      wbuf = gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+      wbuf = gst_tizen_wl_shm_memory_construct_wl_buffer (mem, sink->display,
           &sink->video_info);
     }
     if (wbuf) {
@@ -2448,7 +2454,7 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
       wlbuffer = gst_buffer_get_wl_buffer (buffer);
       if (G_UNLIKELY (!wlbuffer)) {
         mem = gst_buffer_peek_memory (to_render, 0);
-        wbuf = gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+        wbuf = gst_tizen_wl_shm_memory_construct_wl_buffer (mem, sink->display,
             &sink->video_info);
         if (G_UNLIKELY (!wbuf))
           goto no_wl_buffer;
@@ -2512,24 +2518,24 @@ done:
 }
 
 static void
-gst_wayland_sink_videooverlay_init (GstVideoOverlayInterface * iface)
+gst_tizen_wl_sink_videooverlay_init (GstVideoOverlayInterface * iface)
 {
-  iface->set_window_handle = gst_wayland_sink_set_window_handle;
-  iface->set_render_rectangle = gst_wayland_sink_set_render_rectangle;
-  iface->expose = gst_wayland_sink_expose;
+  iface->set_window_handle = gst_tizen_wl_sink_set_window_handle;
+  iface->set_render_rectangle = gst_tizen_wl_sink_set_render_rectangle;
+  iface->expose = gst_tizen_wl_sink_expose;
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT /* use unique_id */
   iface->set_wl_window_wl_surface_id =
-      gst_wayland_sink_set_wl_window_wl_surface_id;
+      gst_tizen_wl_sink_set_wl_window_wl_surface_id;
 #endif
 }
 
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 /* use  unique_id */
 static void
-gst_wayland_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
+gst_tizen_wl_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
     guintptr wl_surface_id)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (overlay);
   FUNCTION;
   g_return_if_fail (sink != NULL);
 
@@ -2544,7 +2550,7 @@ gst_wayland_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
       (guintptr) wl_surface_id);
 
   if (wl_surface_id) {
-    if (G_LIKELY (gst_wayland_sink_find_display (sink))) {
+    if (G_LIKELY (gst_tizen_wl_sink_find_display (sink))) {
       /* we can use our own display with an external window handle */
       if (G_LIKELY (sink->display->own_display)) {
         sink->display->wl_surface_id = (int) wl_surface_id;
@@ -2561,9 +2567,9 @@ gst_wayland_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
 #endif
 
 static void
-gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
+gst_tizen_wl_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (overlay);
   struct wl_surface *surface = (struct wl_surface *) handle;
   FUNCTION;
 
@@ -2583,7 +2589,7 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
   g_clear_object (&sink->window);
 
   if (handle) {
-    if (G_LIKELY (gst_wayland_sink_find_display (sink))) {
+    if (G_LIKELY (gst_tizen_wl_sink_find_display (sink))) {
       /* we cannot use our own display with an external window handle */
       if (G_UNLIKELY (sink->display->own_display)) {
         GST_ELEMENT_WARNING (sink, RESOURCE, OPEN_READ_WRITE,
@@ -2604,10 +2610,10 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
 }
 
 static void
-gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay,
+gst_tizen_wl_sink_set_render_rectangle (GstVideoOverlay * overlay,
     gint x, gint y, gint w, gint h)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (overlay);
   FUNCTION;
 
   g_return_if_fail (sink != NULL);
@@ -2625,15 +2631,15 @@ gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay,
   if (gst_wl_window_set_render_rectangle (sink->window, x, y, w, h)) {
     sink->video_info_changed = TRUE;
     if (sink->window && GST_STATE (sink) == GST_STATE_PAUSED)
-      gst_wayland_sink_update_last_buffer_geometry (sink);
+      gst_tizen_wl_sink_update_last_buffer_geometry (sink);
   }
   g_mutex_unlock (&sink->render_lock);
 }
 
 static void
-gst_wayland_sink_expose (GstVideoOverlay * overlay)
+gst_tizen_wl_sink_expose (GstVideoOverlay * overlay)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (overlay);
   FUNCTION;
 
   g_return_if_fail (sink != NULL);
@@ -2647,18 +2653,19 @@ gst_wayland_sink_expose (GstVideoOverlay * overlay)
   }
   g_mutex_unlock (&sink->render_lock);
 }
+
 #if 0
 static void
-gst_wayland_sink_waylandvideo_init (GstWaylandVideoInterface * iface)
+gst_tizen_wl_sink_waylandvideo_init (GstWaylandVideoInterface * iface)
 {
-  iface->begin_geometry_change = gst_wayland_sink_begin_geometry_change;
-  iface->end_geometry_change = gst_wayland_sink_end_geometry_change;
+  iface->begin_geometry_change = gst_tizen_wl_sink_begin_geometry_change;
+  iface->end_geometry_change = gst_tizen_wl_sink_end_geometry_change;
 }
 
 static void
-gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video)
+gst_tizen_wl_sink_begin_geometry_change (GstWaylandVideo * video)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (video);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (video);
   FUNCTION;
   g_return_if_fail (sink != NULL);
 
@@ -2675,9 +2682,9 @@ gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video)
 }
 
 static void
-gst_wayland_sink_end_geometry_change (GstWaylandVideo * video)
+gst_tizen_wl_sink_end_geometry_change (GstWaylandVideo * video)
 {
-  GstWaylandSink *sink = GST_WAYLAND_SINK (video);
+  GstTizenWlSink *sink = GST_TIZEN_WL_SINK (video);
   FUNCTION;
   g_return_if_fail (sink != NULL);
 
@@ -2697,13 +2704,13 @@ gst_wayland_sink_end_geometry_change (GstWaylandVideo * video)
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  GST_DEBUG_CATEGORY_INIT (gstwayland_debug, "tizenwlsink", 0,
+  GST_DEBUG_CATEGORY_INIT (gst_tizen_wl_debug, "tizenwlsink", 0,
       " tizen wayland video sink");
 
-  gst_wl_shm_allocator_register ();
+  gst_tizen_wl_shm_allocator_register ();
 
   return gst_element_register (plugin, "tizenwlsink", GST_RANK_MARGINAL,
-      GST_TYPE_WAYLAND_SINK);
+      GST_TYPE_TIZEN_WL_SINK);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
similarity index 74%
rename from tizenwlsink/src/gstwaylandsink.h
rename to tizenwlsink/src/gsttizenwlsink.h
index 58c1e11..215bbb4 100644 (file)
@@ -19,8 +19,8 @@
  * Boston, MA 02110-1301 USA.
  */
 
-#ifndef __GST_WAYLAND_VIDEO_SINK_H__
-#define __GST_WAYLAND_VIDEO_SINK_H__
+#ifndef __GST_TIZEN_WL_VIDEO_SINK_H__
+#define __GST_TIZEN_WL_VIDEO_SINK_H__
 
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include "wlwindow.h"
 
 G_BEGIN_DECLS
-#define GST_TYPE_WAYLAND_SINK \
-           (gst_wayland_sink_get_type())
-#define GST_WAYLAND_SINK(obj) \
-           (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WAYLAND_SINK,GstWaylandSink))
-#define GST_WAYLAND_SINK_CLASS(klass) \
-           (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WAYLAND_SINK,GstWaylandSinkClass))
-#define GST_IS_WAYLAND_SINK(obj) \
-           (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAYLAND_SINK))
-#define GST_IS_WAYLAND_SINK_CLASS(klass) \
-           (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAYLAND_SINK))
-#define GST_WAYLAND_SINK_GET_CLASS(inst) \
-        (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_WAYLAND_SINK, GstWaylandSinkClass))
+#define GST_TYPE_TIZEN_WL_SINK \
+           (gst_tizen_wl_sink_get_type())
+#define GST_TIZEN_WL_SINK(obj) \
+           (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TIZEN_WL_SINK,GstTizenWlSink))
+#define GST_TIZEN_WL_SINK_CLASS(klass) \
+           (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TIZEN_WL_SINK,GstTizenWlSinkClass))
+#define GST_IS_TIZEN_WL_SINK(obj) \
+           (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TIZEN_WL_SINK))
+#define GST_IS_TIZEN_WL_SINK_CLASS(klass) \
+           (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TIZEN_WL_SINK))
+#define GST_TIZEN_WL_SINK_GET_CLASS(inst) \
+        (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_TIZEN_WL_SINK, GstTizenWlSinkClass))
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 enum
 {
@@ -60,10 +60,10 @@ enum
 #define DEFAULT_DUMP_COUNT 10
 #endif
 
-typedef struct _GstWaylandSink GstWaylandSink;
-typedef struct _GstWaylandSinkClass GstWaylandSinkClass;
+typedef struct _GstTizenWlSink GstTizenWlSink;
+typedef struct _GstTizenWlSinkClass GstTizenWlSinkClass;
 
-struct _GstWaylandSink
+struct _GstTizenWlSink
 {
   GstVideoSink parent;
 
@@ -112,7 +112,7 @@ struct _GstWaylandSink
 #endif
 };
 
-struct _GstWaylandSinkClass
+struct _GstTizenWlSinkClass
 {
   GstVideoSinkClass parent;
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
@@ -123,8 +123,8 @@ struct _GstWaylandSinkClass
 };
 
 GType
-gst_wayland_sink_get_type (void)
+gst_tizen_wl_sink_get_type (void)
     G_GNUC_CONST;
 
 G_END_DECLS
-#endif /* __GST_WAYLAND_VIDEO_SINK_H__ */
+#endif /* __GST_TIZEN_WL_VIDEO_SINK_H__ */
similarity index 85%
rename from tizenwlsink/src/wlshmallocator.c
rename to tizenwlsink/src/tizen-wlshmallocator.c
index 81e2cfd..b6495d2 100644 (file)
@@ -20,7 +20,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "wlshmallocator.h"
+#include "tizen-wlshmallocator.h"
 #include "wlvideoformat.h"
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 #include "tizen-wlvideoformat.h"
 #include <sys/mman.h>
 #include <sys/types.h>
 
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 
-G_DEFINE_TYPE (GstWlShmAllocator, gst_wl_shm_allocator, GST_TYPE_ALLOCATOR);
+G_DEFINE_TYPE (GstTizenWlShmAllocator, gst_tizen_wl_shm_allocator,
+    GST_TYPE_ALLOCATOR);
 
 gint
-gst_wl_fwrite_data (gchar * file, gpointer data, guint size)
+gst_tizen_wl_fwrite_data (gchar * file, gpointer data, guint size)
 {
   FILE *fp;
 
@@ -55,8 +56,8 @@ gst_wl_fwrite_data (gchar * file, gpointer data, guint size)
 }
 
 static void
-gst_wl_tbm_dump_normal_raw_video (gpointer bo, guint size, guint dump_count,
-    guint dump_total)
+gst_tizen_wl_tbm_dump_normal_raw_video (gpointer bo, guint size,
+    guint dump_count, guint dump_total)
 {
   tbm_bo_handle virtual_addr;
   gint ret;
@@ -73,7 +74,7 @@ gst_wl_tbm_dump_normal_raw_video (gpointer bo, guint size, guint dump_count,
 
   snprintf (file_name, sizeof (file_name), "/tmp/WLSINK_OUT_DUMP_%2.2d.dump",
       dump_count);
-  ret = gst_wl_fwrite_data (file_name, virtual_addr.ptr, size);
+  ret = gst_tizen_wl_fwrite_data (file_name, virtual_addr.ptr, size);
   if (ret) {
     GST_ERROR ("_write_rawdata() failed");
   }
@@ -81,7 +82,8 @@ gst_wl_tbm_dump_normal_raw_video (gpointer bo, guint size, guint dump_count,
 }
 
 static void
-gst_wl_tbm_dump_native_raw_video (GstWlDisplay * display, guint dump_count)
+gst_tizen_wl_tbm_dump_native_raw_video (GstWlDisplay * display,
+    guint dump_count)
 {
   gchar file_name[128];
   gchar err_str[256];
@@ -144,16 +146,16 @@ gst_wl_tbm_dump_native_raw_video (GstWlDisplay * display, guint dump_count)
 }
 
 static GstMemory *
-gst_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
+gst_tizen_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
     GstAllocationParams * params)
 {
-  GstWlShmAllocator *self = GST_WL_SHM_ALLOCATOR (allocator);
+  GstTizenWlShmAllocator *self = GST_TIZEN_WL_SHM_ALLOCATOR (allocator);
   char filename[1024];
   static int init = 0;
   int fd;
   int idx;
   gpointer data;
-  GstWlShmMemory *mem;
+  GstTizenWlShmMemory *mem;
   gchar err_str[256];
   FUNCTION;
 
@@ -189,7 +191,7 @@ gst_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
       return FALSE;
     }
 
-    mem = g_slice_new0 (GstWlShmMemory);
+    mem = g_slice_new0 (GstTizenWlShmMemory);
     gst_memory_init ((GstMemory *) mem, GST_MEMORY_FLAG_NO_SHARE, allocator,
         NULL, size, 0, 0, size);
     mem->data = virtual_addr.ptr;
@@ -228,7 +230,7 @@ gst_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
 
     unlink (filename);
 
-    mem = g_slice_new0 (GstWlShmMemory);
+    mem = g_slice_new0 (GstTizenWlShmMemory);
     gst_memory_init ((GstMemory *) mem, GST_MEMORY_FLAG_NO_SHARE, allocator,
         NULL, size, 0, 0, size);
     mem->data = data;
@@ -265,7 +267,7 @@ gst_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
 
   unlink (filename);
 
-  mem = g_slice_new0 (GstWlShmMemory);
+  mem = g_slice_new0 (GstTizenWlShmMemory);
   gst_memory_init ((GstMemory *) mem, GST_MEMORY_FLAG_NO_SHARE, allocator, NULL,
       size, 0, 0, size);
   mem->data = data;
@@ -276,85 +278,85 @@ gst_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
 }
 
 static void
-gst_wl_shm_allocator_free (GstAllocator * allocator, GstMemory * memory)
+gst_tizen_wl_shm_allocator_free (GstAllocator * allocator, GstMemory * memory)
 {
-  GstWlShmMemory *shm_mem = (GstWlShmMemory *) memory;
+  GstTizenWlShmMemory *shm_mem = (GstTizenWlShmMemory *) memory;
   FUNCTION;
   GST_LOG ("shm_mem->fd(%d)", shm_mem->fd);
   if (shm_mem->fd != -1)
     close (shm_mem->fd);
   munmap (shm_mem->data, memory->maxsize);
 
-  g_slice_free (GstWlShmMemory, shm_mem);
+  g_slice_free (GstTizenWlShmMemory, shm_mem);
 }
 
 static gpointer
-gst_wl_shm_mem_map (GstMemory * mem, gsize maxsize, GstMapFlags flags)
+gst_tizen_wl_shm_mem_map (GstMemory * mem, gsize maxsize, GstMapFlags flags)
 {
   FUNCTION;
-  return ((GstWlShmMemory *) mem)->data;
+  return ((GstTizenWlShmMemory *) mem)->data;
 }
 
 static void
-gst_wl_shm_mem_unmap (GstMemory * mem)
+gst_tizen_wl_shm_mem_unmap (GstMemory * mem)
 {
 }
 
 static void
-gst_wl_shm_allocator_class_init (GstWlShmAllocatorClass * klass)
+gst_tizen_wl_shm_allocator_class_init (GstTizenWlShmAllocatorClass * klass)
 {
   GstAllocatorClass *alloc_class = (GstAllocatorClass *) klass;
   FUNCTION;
 
-  alloc_class->alloc = GST_DEBUG_FUNCPTR (gst_wl_shm_allocator_alloc);
-  alloc_class->free = GST_DEBUG_FUNCPTR (gst_wl_shm_allocator_free);
+  alloc_class->alloc = GST_DEBUG_FUNCPTR (gst_tizen_wl_shm_allocator_alloc);
+  alloc_class->free = GST_DEBUG_FUNCPTR (gst_tizen_wl_shm_allocator_free);
 }
 
 static void
-gst_wl_shm_allocator_init (GstWlShmAllocator * self)
+gst_tizen_wl_shm_allocator_init (GstTizenWlShmAllocator * self)
 {
   FUNCTION;
-  self->parent_instance.mem_type = GST_ALLOCATOR_WL_SHM;
-  self->parent_instance.mem_map = gst_wl_shm_mem_map;
-  self->parent_instance.mem_unmap = gst_wl_shm_mem_unmap;
+  self->parent_instance.mem_type = GST_ALLOCATOR_TIZEN_WL_SHM;
+  self->parent_instance.mem_map = gst_tizen_wl_shm_mem_map;
+  self->parent_instance.mem_unmap = gst_tizen_wl_shm_mem_unmap;
 
   GST_OBJECT_FLAG_SET (self, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
 }
 
 void
-gst_wl_shm_allocator_register (void)
+gst_tizen_wl_shm_allocator_register (void)
 {
   FUNCTION;
-  gst_allocator_register (GST_ALLOCATOR_WL_SHM,
-      g_object_new (GST_TYPE_WL_SHM_ALLOCATOR, NULL));
+  gst_allocator_register (GST_ALLOCATOR_TIZEN_WL_SHM,
+      g_object_new (GST_TYPE_TIZEN_WL_SHM_ALLOCATOR, NULL));
 }
 
 GstAllocator *
-gst_wl_shm_allocator_get (void)
+gst_tizen_wl_shm_allocator_get (void)
 {
   FUNCTION;
-  return gst_allocator_find (GST_ALLOCATOR_WL_SHM);
+  return gst_allocator_find (GST_ALLOCATOR_TIZEN_WL_SHM);
 }
 
 gboolean
 gst_is_wl_shm_memory (GstMemory * mem)
 {
   FUNCTION;
-  return gst_memory_is_type (mem, GST_ALLOCATOR_WL_SHM);
+  return gst_memory_is_type (mem, GST_ALLOCATOR_TIZEN_WL_SHM);
 }
 
 gboolean
-gst_is_wl_memory (GstMemory * mem)
+gst_is_tizen_wl_memory (GstMemory * mem)
 {
   FUNCTION;
-  return gst_memory_is_type (mem, GST_ALLOCATOR_WL_SHM);
+  return gst_memory_is_type (mem, GST_ALLOCATOR_TIZEN_WL_SHM);
 }
 
 struct wl_buffer *
-gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
-    const GstVideoInfo * info)
+gst_tizen_wl_shm_memory_construct_wl_buffer (GstMemory * mem,
+    GstWlDisplay * display, const GstVideoInfo * info)
 {
-  GstWlShmMemory *shm_mem = (GstWlShmMemory *) mem;
+  GstTizenWlShmMemory *shm_mem = (GstTizenWlShmMemory *) mem;
   gint width, height, stride;
   gsize size;
   gint plane_size[GST_VIDEO_MAX_PLANES], n_planes, i;
@@ -371,7 +373,7 @@ gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
     if (display->is_native_format == TRUE) {
       /* In case of native format, use MMVideoBuffer data instead of GstVideoInfo */
       if (display->dump_video)
-        gst_wl_tbm_dump_native_raw_video (display, display->dump_count++);
+        gst_tizen_wl_tbm_dump_native_raw_video (display, display->dump_count++);
 
       width = display->width[0];
       height = display->height[0];
@@ -429,7 +431,7 @@ gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
       size = GST_VIDEO_INFO_SIZE (info);
 
       format = gst_video_format_to_wl_tbm_format (GST_VIDEO_INFO_FORMAT (info));
-      g_return_val_if_fail (gst_is_wl_memory (mem), NULL);
+      g_return_val_if_fail (gst_is_tizen_wl_memory (mem), NULL);
       g_return_val_if_fail (size <= mem->size, NULL);
       g_return_val_if_fail (shm_mem->fd != -1, NULL);
 
@@ -437,7 +439,7 @@ gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
           G_GSSIZE_FORMAT " (%d x %d, stride %d)", size, width, height, stride);
 
       if (display->dump_video) {
-        gst_wl_tbm_dump_normal_raw_video (shm_mem->tbm_bo_ptr, size,
+        gst_tizen_wl_tbm_dump_normal_raw_video (shm_mem->tbm_bo_ptr, size,
             display->dump_count++, display->total_dump);
         if (display->dump_count > display->total_dump)
           display->dump_video = FALSE;
@@ -498,7 +500,7 @@ gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
     stride = GST_VIDEO_INFO_PLANE_STRIDE (info, 0);
     size = GST_VIDEO_INFO_SIZE (info);
     format = gst_video_format_to_wl_shm_format (GST_VIDEO_INFO_FORMAT (info));
-    g_return_val_if_fail (gst_is_wl_memory (mem), NULL);
+    g_return_val_if_fail (gst_is_tizen_wl_memory (mem), NULL);
     g_return_val_if_fail (size <= mem->size, NULL);
     g_return_val_if_fail (shm_mem->fd != -1, NULL);
 
diff --git a/tizenwlsink/src/tizen-wlshmallocator.h b/tizenwlsink/src/tizen-wlshmallocator.h
new file mode 100644 (file)
index 0000000..3acbcc8
--- /dev/null
@@ -0,0 +1,80 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_TIZEN_WL_SHM_ALLOCATOR_H__
+#define __GST_TIZEN_WL_SHM_ALLOCATOR_H__
+
+#include <wayland-client-protocol.h>
+#include "wldisplay.h"
+
+G_BEGIN_DECLS
+#define GST_TYPE_TIZEN_WL_SHM_ALLOCATOR                  (gst_tizen_wl_shm_allocator_get_type ())
+#define GST_TIZEN_WL_SHM_ALLOCATOR(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIZEN_WL_SHM_ALLOCATOR, GstTizenWlShmAllocator))
+#define GST_IS_TIZEN_WL_SHM_ALLOCATOR(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIZEN_WL_SHM_ALLOCATOR))
+#define GST_TIZEN_WL_SHM_ALLOCATOR_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TIZEN_WL_SHM_ALLOCATOR, GstTizenWlShmAllocatorClass))
+#define GST_IS_TIZEN_WL_SHM_ALLOCATOR_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TIZEN_WL_SHM_ALLOCATOR))
+#define GST_TIZEN_WL_SHM_ALLOCATOR_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TIZEN_WL_SHM_ALLOCATOR, GstTizenWlShmAllocatorClass))
+#define GST_ALLOCATOR_TIZEN_WL_SHM "tizen_wl_shm"
+
+typedef struct _GstTizenWlShmMemory GstTizenWlShmMemory;
+typedef struct _GstTizenWlShmAllocator GstTizenWlShmAllocator;
+typedef struct _GstTizenWlShmAllocatorClass GstTizenWlShmAllocatorClass;
+
+struct _GstTizenWlShmMemory
+{
+  GstMemory parent;
+
+  gpointer data;
+  gint fd;
+#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
+  gpointer tbm_bo_ptr;
+#endif
+};
+
+struct _GstTizenWlShmAllocator
+{
+  GstAllocator parent_instance;
+#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
+  GstWlDisplay *display;
+#endif
+};
+
+struct _GstTizenWlShmAllocatorClass
+{
+  GstAllocatorClass parent_class;
+};
+
+GType gst_tizen_wl_shm_allocator_get_type (void);
+
+void gst_tizen_wl_shm_allocator_register (void);
+GstAllocator *gst_tizen_wl_shm_allocator_get (void);
+
+gboolean gst_is_tizen_wl_shm_memory (GstMemory * mem);
+struct wl_buffer *gst_tizen_wl_shm_memory_construct_wl_buffer (GstMemory * mem,
+    GstWlDisplay * display, const GstVideoInfo * info);
+
+#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
+gint gst_tizen_wl_fwrite_data (gchar * file, gpointer data, guint size);
+gboolean gst_is_tizen_wl_memory (GstMemory * mem);
+#endif
+G_END_DECLS
+#endif /* __GST_TIZEN_WL_SHM_ALLOCATOR_H__ */
index 8ebf505..e4d8a81 100644 (file)
@@ -27,8 +27,8 @@
 #include "tizen-wlvideoformat.h"
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
 
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 
 typedef struct
 {
old mode 100755 (executable)
new mode 100644 (file)
index c37e61e..55b7162 100644 (file)
@@ -78,8 +78,8 @@
 
 #include "wlbuffer.h"
 
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 
 G_DEFINE_TYPE (GstWlBuffer, gst_wl_buffer, G_TYPE_OBJECT);
 
index 7e9e39e..ac058c2 100644 (file)
@@ -53,8 +53,8 @@ static const struct tizen_video_listener tizen_video_listener = {
 };
 #endif
 
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 
 G_DEFINE_TYPE (GstWlDisplay, gst_wl_display, G_TYPE_OBJECT);
 
diff --git a/tizenwlsink/src/wlshmallocator.h b/tizenwlsink/src/wlshmallocator.h
deleted file mode 100644 (file)
index 9f111d3..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* GStreamer Wayland video sink
- *
- * Copyright (C) 2012 Intel Corporation
- * Copyright (C) 2012 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
- * Copyright (C) 2014 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_WL_SHM_ALLOCATOR_H__
-#define __GST_WL_SHM_ALLOCATOR_H__
-
-#include <wayland-client-protocol.h>
-#include "wldisplay.h"
-
-G_BEGIN_DECLS
-#define GST_TYPE_WL_SHM_ALLOCATOR                  (gst_wl_shm_allocator_get_type ())
-#define GST_WL_SHM_ALLOCATOR(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_SHM_ALLOCATOR, GstWlShmAllocator))
-#define GST_IS_WL_SHM_ALLOCATOR(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_SHM_ALLOCATOR))
-#define GST_WL_SHM_ALLOCATOR_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_SHM_ALLOCATOR, GstWlShmAllocatorClass))
-#define GST_IS_WL_SHM_ALLOCATOR_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_SHM_ALLOCATOR))
-#define GST_WL_SHM_ALLOCATOR_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_SHM_ALLOCATOR, GstWlShmAllocatorClass))
-#define GST_ALLOCATOR_WL_SHM "wl_shm"
-typedef struct _GstWlShmMemory GstWlShmMemory;
-typedef struct _GstWlShmAllocator GstWlShmAllocator;
-typedef struct _GstWlShmAllocatorClass GstWlShmAllocatorClass;
-
-struct _GstWlShmMemory
-{
-  GstMemory parent;
-
-  gpointer data;
-  gint fd;
-#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-  gpointer tbm_bo_ptr;
-#endif
-};
-
-struct _GstWlShmAllocator
-{
-  GstAllocator parent_instance;
-#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-  GstWlDisplay *display;
-#endif
-};
-
-struct _GstWlShmAllocatorClass
-{
-  GstAllocatorClass parent_class;
-};
-
-GType gst_wl_shm_allocator_get_type (void);
-
-void gst_wl_shm_allocator_register (void);
-GstAllocator *gst_wl_shm_allocator_get (void);
-
-gboolean gst_is_wl_shm_memory (GstMemory * mem);
-struct wl_buffer *gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem,
-    GstWlDisplay * display, const GstVideoInfo * info);
-
-#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-gint gst_wl_fwrite_data (gchar * file, gpointer data, guint size);
-gboolean gst_is_wl_memory (GstMemory * mem);
-#endif
-G_END_DECLS
-#endif /* __GST_WL_SHM_ALLOCATOR_H__ */
index 59e9c95..a4f57a7 100644 (file)
@@ -26,8 +26,8 @@
 
 #include "wlvideoformat.h"
 
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 #define FUNCTION GST_LOG ("<ENTER>")
 typedef struct
 {
index c8d8366..1a44092 100644 (file)
 #include <config.h>
 #endif
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-#include "gstwaylandsink.h"
+#include "gsttizenwlsink.h"
 #else
 #include "wlwindow.h"
 #endif
-#include "wlshmallocator.h"
+#include "tizen-wlshmallocator.h"
 #include "wlbuffer.h"
 
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_tizen_wl_debug);
+#define GST_CAT_DEFAULT gst_tizen_wl_debug
 
 G_DEFINE_TYPE (GstWlWindow, gst_wl_window, G_TYPE_OBJECT);
 
@@ -128,23 +128,25 @@ gst_wl_window_map_sub_surface (GstWlDisplay * display, GstWlWindow * window,
   GstMapInfo mapinfo;
   struct wl_buffer *wlbuf;
   GstWlBuffer *gwlbuf;
-  GstWlShmAllocator *self = NULL;
+  GstTizenWlShmAllocator *self = NULL;
   FUNCTION;
 
   g_return_if_fail (display != NULL);
   g_return_if_fail (window != NULL);
   g_return_if_fail (info != NULL);
 
-  self = GST_WL_SHM_ALLOCATOR (gst_wl_shm_allocator_get ());
+  self = GST_TIZEN_WL_SHM_ALLOCATOR (gst_tizen_wl_shm_allocator_get ());
   self->display = display;
 
-  buf = gst_buffer_new_allocate (gst_wl_shm_allocator_get (), info->size, NULL);
+  buf =
+      gst_buffer_new_allocate (gst_tizen_wl_shm_allocator_get (), info->size,
+      NULL);
   gst_buffer_map (buf, &mapinfo, GST_MAP_WRITE);
   *((guint32 *) mapinfo.data) = 0;      /* paint it black */
   gst_buffer_unmap (buf, &mapinfo);
   wlbuf =
-      gst_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
-      display, info);
+      gst_tizen_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf,
+          0), display, info);
 
   gwlbuf = gst_buffer_add_wl_buffer (buf, wlbuf, display);
   gst_wl_buffer_attach (gwlbuf, window->area_surface);
@@ -322,13 +324,15 @@ gst_wl_window_new_internal (GstWlDisplay * display)
     gst_wl_window_map_sub_surface (display, window, &info);
   }
 #else /* open source */
-  buf = gst_buffer_new_allocate (gst_wl_shm_allocator_get (), info.size, NULL);
+  buf =
+      gst_buffer_new_allocate (gst_tizen_wl_shm_allocator_get (), info.size,
+      NULL);
   gst_buffer_map (buf, &mapinfo, GST_MAP_WRITE);
   *((guint32 *) mapinfo.data) = 0;      /* paint it black */
   gst_buffer_unmap (buf, &mapinfo);
   wlbuf =
-      gst_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
-      display, &info);
+      gst_tizen_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf,
+          0), display, &info);
   gwlbuf = gst_buffer_add_wl_buffer (buf, wlbuf, display);
   gst_wl_buffer_attach (gwlbuf, window->area_surface);