2. gst_wayland_compositor_release_all_buffers function is used for Normal Video format only.
Change-Id: I50486eaf1f474ea92a9c324515bc4c1c58b56a67
Signed-off-by: Hyunil Park <hyunil46.park@samsung.com>
gst_buffer_unref (sink->last_buffer);
if (sink->display) {
/* see comment about this call in gst_wayland_sink_change_state() */
- if (sink->pool) {
+#ifdef GST_WLSINK_ENHANCEMENT
+ if (sink->pool && !sink->display->is_native_format)
+#else
+ if (sink->pool)
+#endif
gst_wayland_compositor_release_all_buffers (GST_WAYLAND_BUFFER_POOL
(sink->pool));
- }
+
g_object_unref (sink->display);
}
if (sink->window)
* unref the pool and therefore the display, which will try to
* stop the thread from within itself and cause a deadlock.
*/
- if (sink->pool) {
+#ifdef GST_WLSINK_ENHANCEMENT
+ if (sink->pool && !sink->display->is_native_format)
+#else
+ if (sink->pool)
+#endif
gst_wayland_compositor_release_all_buffers (GST_WAYLAND_BUFFER_POOL
(sink->pool));
- }
g_clear_object (&sink->display);
g_clear_object (&sink->pool);
}
#ifdef GST_WLSINK_ENHANCEMENT
if (GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_SN12 ||
GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_ST12) {
- sink->display->is_special_format = TRUE;
+ sink->display->is_native_format = TRUE;
} else {
- sink->display->is_special_format = FALSE;
+ sink->display->is_native_format = FALSE;
/* create a new pool for the new configuration */
newpool = gst_wayland_buffer_pool_new (sink->display);
guint size;
gboolean need_pool;
- if (sink->display->is_special_format == TRUE)
+ if (sink->display->is_native_format == TRUE)
return TRUE;
gst_query_parse_allocation (query, &caps, &need_pool);
GST_LOG_OBJECT (sink, "buffer %p not from our pool, copying", buffer);
#ifdef GST_WLSINK_ENHANCEMENT
- if (sink->display->is_special_format == TRUE) {
+ if (sink->display->is_native_format == TRUE) {
/*in case of SN12 or ST12 video format */
GstMemory *mem;
GstMapInfo mem_info = GST_MAP_INFO_INIT;
#include <sys/mman.h>
#include <sys/types.h>
#ifdef GST_WLSINK_ENHANCEMENT
-#define DUMP_BUFFER
+//#define DUMP_BUFFER
#ifdef DUMP_BUFFER
int dump_cnt = 0;
int _write_rawdata (const char *file, const void *data, unsigned int size);
static gboolean gst_wayland_tizen_buffer_pool_stop (GstBufferPool * pool);
static GstFlowReturn gst_wayland_tizen_buffer_pool_alloc (GstBufferPool * pool,
GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
-static void tizen_buffer_release (void *data, struct wl_buffer *wl_buffer);
#endif
#define gst_wayland_buffer_pool_parent_class parent_class
meta->used_by_compositor = FALSE;
/* unlock before unref because stop() may be called from here */
g_mutex_unlock (&self->buffers_map_mutex);
+ GST_ERROR("gst_buffer_unref");
gst_buffer_unref (buffer);
return;
}
tbm_bo_handle vitual_addr;
guint size = 0;
- if (self->display->is_special_format == TRUE) {
+ if (self->display->is_native_format == TRUE) {
/*in case of SN12 or ST12 video format */
size = self->display->native_video_size * 15;
vitual_addr.ptr = NULL;
GstWlMeta *meta;
tbm_bo_handle vitual_addr;
- if (self->display->is_special_format == TRUE) {
+ if (self->display->is_native_format == TRUE) {
/*in case of SN12 or ST12 video format */
unsigned int name[NV_BUF_PLANE_NUM];
unsigned int offset[NV_BUF_PLANE_NUM] = { 0, };
g_thread_join (self->thread);
#ifdef GST_WLSINK_ENHANCEMENT
- if (self->is_special_format == FALSE) { /*need to remove */
+ if (self->is_native_format == FALSE) {
/*in case of normal video format */
if (self->tbm_bo)
tbm_bo_unref (self->tbm_bo);
tbm_bufmgr tbm_bufmgr;
tbm_bo tbm_bo;
- gboolean is_special_format; /*SN12, ST12 */
+ gboolean is_native_format; /*SN12, ST12 */
void *bo[NV_BUF_PLANE_NUM];
int plane_size[NV_BUF_PLANE_NUM];
int stride_width[NV_BUF_PLANE_NUM];
Name: gst-plugins-bad
Version: 1.4.1
-Release: 4
+Release: 5
Summary: GStreamer Streaming-Media Framework Plug-Ins
License: GPL-2.0+ and LGPL-2.1+
Group: Multimedia/Framework