GST_OBJECT_FLAG_SET (allocator, flags);
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- if (!V4L2_TYPE_IS_OUTPUT (v4l2object->type) &&
+ if (v4l2object->tbm_output &&
+ !V4L2_TYPE_IS_OUTPUT (v4l2object->type) &&
v4l2object->mode == GST_V4L2_IO_DMABUF) {
tbm_surface_h tmp_surface = NULL;
int width = GST_VIDEO_INFO_WIDTH (&v4l2object->info);
group->planes[i].length - group->planes[i].data_offset, i, NULL,
expbuf.fd, group);
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- bos[i] = tbm_bo_import_fd (allocator->bufmgr, expbuf.fd);
- GST_INFO_OBJECT (allocator, "obj[%p,i:%d]: fd[%d] -> bo[%p]",
- obj, expbuf.index, expbuf.fd, bos[i]);
+ if (obj->tbm_output) {
+ bos[i] = tbm_bo_import_fd (allocator->bufmgr, expbuf.fd);
+ GST_INFO_OBJECT (allocator, "obj[%p,i:%d]: fd[%d] -> bo[%p]",
+ obj, expbuf.index, expbuf.fd, bos[i]);
+ }
#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
} else {
/* Take back the allocator reference */
}
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- if (!group->surface) {
+ if (obj->tbm_output && !group->surface) {
group->surface = tbm_surface_internal_create_with_bos (&allocator->s_info, bos, group->n_mem);
GST_INFO_OBJECT (allocator, "new surface[%p] in memory group[%p]", group->surface, group);
}