g_mutex_lock (&comp->lock);
+#ifdef TIZEN_FEATURE_OMX
+ if (!buf->omx_buf) {
+ GST_ERROR_OBJECT (comp->parent, "Component %s has null buffer : %p "
+ , comp->name, buf);
+ goto done;
+ }
+#endif
GST_DEBUG_OBJECT (comp->parent, "Releasing buffer %p (%p) to %s port %u",
buf, buf->omx_buf->pBuffer, comp->name, port->index);
goto done;
}
+#ifdef TIZEN_FEATURE_OMX
+ if (port->flush_start || port->flushing || port->disabled_pending || !port->port_def.bEnabled) {
+#else
if (port->flushing || port->disabled_pending || !port->port_def.bEnabled) {
+#endif
GST_DEBUG_OBJECT (comp->parent,
"%s port %u is flushing or disabled, not releasing " "buffer",
comp->name, port->index);
}
for (j = 0; j < port->index + 1; j++) {
- handle_bo = tbm_bo_get_handle(mm_vbuffer[i]->handle.bo[j], TBM_DEVICE_MM);
+ handle_bo = tbm_bo_get_handle (mm_vbuffer[i]->handle.bo[j], TBM_DEVICE_MM);
if (handle_bo.ptr == NULL) {
g_mutex_unlock (&port->comp->lock);
goto error;
}
mm_vbuffer[i]->handle.dmabuf_fd[j] = handle_bo.u32;
- handle_bo = tbm_bo_get_handle(mm_vbuffer[i]->handle.bo[j], TBM_DEVICE_CPU);
+ handle_bo = tbm_bo_get_handle (mm_vbuffer[i]->handle.bo[j], TBM_DEVICE_CPU);
if (handle_bo.ptr == NULL) {
g_mutex_unlock (&port->comp->lock);
goto error;
if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_TBM_BO) {
GST_LOG_OBJECT (self, "dec output buf: bo[0] :%p, bo[1] : %p, fd[0]:%d fd[1]:%d fd[2]:%d w[0]:%d h[0]:%d buf_share_method:%d",
- mm_vbuffer->handle.bo[0], mm_vbuffer->handle.bo[1], mm_vbuffer->handle.dmabuf_fd[0], mm_vbuffer->handle.dmabuf_fd[1], mm_vbuffer->handle.dmabuf_fd[2],
- mm_vbuffer->width[0], mm_vbuffer->height[0], mm_vbuffer->type);
+ mm_vbuffer->handle.bo[0], mm_vbuffer->handle.bo[1], mm_vbuffer->handle.dmabuf_fd[0], mm_vbuffer->handle.dmabuf_fd[1], mm_vbuffer->handle.dmabuf_fd[2],
+ mm_vbuffer->width[0], mm_vbuffer->height[0], mm_vbuffer->type);
} else if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS) {
GST_LOG_OBJECT (self, "dec output uses hw addr");
} else {
decoder_output_dump(self, mm_vbuffer);
#endif
if (gst_buffer_n_memory (outbuf) < 2) {
- data = g_malloc0 (sizeof (MMVideoBuffer));
- mem = gst_memory_new_wrapped(0, data, sizeof (MMVideoBuffer), 0, sizeof (MMVideoBuffer), data, g_free);
- gst_buffer_append_memory (outbuf, mem);
+ data = g_malloc0 (sizeof (MMVideoBuffer));
+ mem = gst_memory_new_wrapped (0, data, sizeof (MMVideoBuffer), 0, sizeof (MMVideoBuffer), data, g_free);
+ gst_buffer_append_memory (outbuf, mem);
} else {
- GstMapInfo info = GST_MAP_INFO_INIT;
+ GstMapInfo info = GST_MAP_INFO_INIT;
- mem = gst_buffer_peek_memory (outbuf, 1);
- gst_memory_map (mem, &info, GST_MAP_WRITE);
- data = info.data;
- gst_memory_unmap (mem, &info);
+ mem = gst_buffer_peek_memory (outbuf, 1);
+ gst_memory_map (mem, &info, GST_MAP_WRITE);
+ data = info.data;
+ gst_memory_unmap (mem, &info);
}
memcpy (data, mm_vbuffer, sizeof (MMVideoBuffer));