Name: gst-plugins-tizen
Version: 1.0.0
Summary: GStreamer tizen plugins (common)
-Release: 44
+Release: 45
Group: Multimedia/Framework
Url: http://gstreamer.freedesktop.org/
License: LGPL-2.1+
Summary: Extension for mobile TM1
Requires: %{name} = %{version}-%{release}
#!BuildIgnore: kernel-headers
-BuildConflicts: linux-glibc-devel
-BuildRequires: kernel-headers-3.10-sc7730
%description extension-TM1
GStreamer tizen plugins Extension for mobile TM1
# if mobile || "undefined"
%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
# extension-TM1
-export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_PROFILE_LITE"
+export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_PRODUCT_TM1"
./autogen.sh --disable-static
%configure \
#include <tbm_surface_internal.h>
#include "gstwaylandsrc.h"
-#ifdef TIZEN_PROFILE_LITE
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <linux/ion.h>
-#endif
-
GST_DEBUG_CATEGORY_STATIC (waylandsrc_debug);
#define GST_CAT_DEFAULT waylandsrc_debug
static void
mirror_handle_stop (void *data, struct tizen_screenmirror *tizen_screenmirror);
-#ifdef TIZEN_PROFILE_LITE
-static int __tbm_get_physical_addr_bo(tbm_bo_handle tbm_bo_handle_fd_t, int *phy_addr, int *phy_size);
-#endif
-
static const struct tizen_screenmirror_listener mirror_listener = {
mirror_handle_dequeued,
mirror_handle_content,
GstClock *clock = NULL;
GstClockTime base_time, next_capture_ts;
gint64 next_frame_no;
-#ifdef TIZEN_PROFILE_LITE
- int phy_addr = 0;
- int phy_size = 0;
- tbm_bo_handle handle_fd;
-#endif
wl_list_for_each (out_buffer, &src->buffer_list, link) {
if (out_buffer->wl_buffer != buffer)
mm_video_buf->handle.bo[0] = out_buffer->bo[0];
mm_video_buf->handle.bo[1] = out_buffer->bo[1];
GST_INFO_OBJECT (src, "BO : %p %p", mm_video_buf->handle.bo[0], mm_video_buf->handle.bo[1]);
-#ifndef TIZEN_PROFILE_LITE
+#ifndef TIZEN_FEATURE_PRODUCT_TM1
mm_video_buf->size[0] = gst_calculate_y_size(src->width, src->height); /*(src->width * src->height);*/
mm_video_buf->size[1] = gst_calculate_uv_size(src->width, src->height); /*(src->width * (src->height >> 1));*/
GST_INFO_OBJECT (src, "Size : %d %d", mm_video_buf->size[0], mm_video_buf->size[1]);
mm_video_buf->stride_height[1] = GST_ROUND_UP_16 (mm_video_buf->height[1]);
mm_video_buf->is_secured = 0;
-#ifdef TIZEN_PROFILE_LITE
+#ifdef TIZEN_FEATURE_PRODUCT_TM1
mm_video_buf->size[0] = mm_video_buf->stride_width[0] * mm_video_buf->stride_height[0];
mm_video_buf->size[1] = mm_video_buf->stride_width[1] * mm_video_buf->stride_height[1];
GST_INFO_OBJECT (src, "Size : %d %d", mm_video_buf->size[0], mm_video_buf->size[1]);
- handle_fd = tbm_bo_get_handle(mm_video_buf->handle.bo[0], TBM_DEVICE_MM);
- if (__tbm_get_physical_addr_bo(handle_fd, &phy_addr, &phy_size) == 0) {
- mm_video_buf->handle.paddr[0] = (void *)phy_addr;
- GST_INFO_OBJECT(src, "mm_vbuffer->paddr : %p", mm_video_buf->handle.paddr[0]);
- }
mm_video_buf->data[0] = (tbm_bo_map(mm_video_buf->handle.bo[0], TBM_DEVICE_CPU, TBM_OPTION_WRITE)).ptr;
tbm_bo_unmap (mm_video_buf->handle.bo[0]);
#endif
info.planes[1].offset = 0;
info.size = info.planes[0].size + info.planes[1].size;
-#ifdef TIZEN_PROFILE_LITE
+#ifdef TIZEN_FEATURE_PRODUCT_TM1
out_buffer->bo[0] =
tbm_bo_alloc (bufmgr, info.size, TBM_BO_DEFAULT);
if (out_buffer->bo[0] == NULL)
}
}
-#ifdef TIZEN_PROFILE_LITE
-int __tbm_get_physical_addr_bo(tbm_bo_handle tbm_bo_handle_fd_t, int *phy_addr, int *phy_size)
-{
- int tbm_bo_handle_fd;
-
- int ret = 0;
-
- tbm_bo_handle_fd = tbm_bo_handle_fd_t.u32;
-
- int open_flags = O_RDWR;
- int ion_fd = -1;
-
- struct ion_mmu_data mmu_data;
- struct ion_custom_data custom_data;
-
- mmu_data.fd_buffer = tbm_bo_handle_fd;
- custom_data.cmd = 4;
- custom_data.arg = (unsigned long)&mmu_data;
-
- ion_fd = open("/dev/ion", open_flags);
- if (ion_fd < 0)
- GST_ERROR("[tbm_get_physical_addr_bo] ion_fd open device failed");
-
- if (ioctl(ion_fd, ION_IOC_CUSTOM, &custom_data) < 0) {
- GST_ERROR("[tbm_get_physical_addr_bo] ION_IOC_CUSTOM failed");
- ret = -1;
- }
-
- if (!ret) {
- *phy_addr = mmu_data.iova_addr;
- *phy_size = mmu_data.iova_size;
- } else {
- *phy_addr = 0;
- *phy_size = 0;
- GST_INFO("[tbm_get_physical_addr_bo] getting physical address is failed. phy_addr = 0");
- }
-
- if (ion_fd >= 0) {
- close(ion_fd);
- ion_fd = -1;
- }
-
- return 0;
-}
-#endif
-
static gboolean
plugin_init (GstPlugin * plugin)
{