#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"},
{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"},
{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"},
{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
#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,
"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;
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));
"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,
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,
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);
}
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;
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");
}
}
static void
-gst_wayland_sink_init (GstWaylandSink * sink)
+gst_tizen_wl_sink_init (GstTizenWlSink * sink)
{
FUNCTION;
#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
#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);
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
}
static void
-gst_wayland_sink_stop_video (GstWaylandSink * sink)
+gst_tizen_wl_sink_stop_video (GstTizenWlSink * sink)
{
FUNCTION;
g_return_if_fail (sink != NULL);
}
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);
}
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;
}
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;
#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;
}
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);
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++) {
#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;
}
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;
}
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;
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 */
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;
} 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;
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;
}
#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) {
}
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);
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:
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);
}
}
} 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;
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);
}
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..");
#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:
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;
}
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);
#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;
}
#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;
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
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
}
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:
&& !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;
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
}
#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
}
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
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);
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 ();
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;
}
} 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 */
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;
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 */
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;
}
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;
/* 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);
}
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);
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");
#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);
#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;
/* 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);
static gboolean
-gst_wayland_sink_has_wlbuffer (GstWaylandSink * sink, GstBuffer * buffer)
+gst_tizen_wl_sink_has_wlbuffer (GstTizenWlSink * sink, GstBuffer * buffer)
{
GstWlBuffer *gstwlbuffer;
FUNCTION;
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 */
}
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;
/* 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 {
"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 {
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;
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);
}
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;
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;
}
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");
}
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;
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");
}
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;
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);
}
}
}
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);
}
static void
-gst_wayland_sink_get_window (GstWaylandSink * sink)
+gst_tizen_wl_sink_get_window (GstTizenWlSink * sink)
{
g_return_if_fail (sink != NULL);
FUNCTION;
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;
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 */
/* 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;
}
/* replace last_buffer */
- gst_wayland_sink_buffer_replace (sink, buffer);
+ gst_tizen_wl_sink_buffer_replace (sink, buffer);
/* rendering */
if (sink->visible) {
#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;
/* 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() */
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) {
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;
}
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);
(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;
#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;
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,
}
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);
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);
}
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);
}
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);
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,