--- /dev/null
- upstream_branch = upstream/1.12
+[general]
++upstream_branch = upstream/1.16
+upstream_tag = ${upstreamversion}
+ This is GStreamer gst-plugins-base 1.16.2.
- Release notes for GStreamer Base PluginsĀ 1.12.2
+ The GStreamer team is pleased to announce another bug-fix release in the
+ stable 1.x API series of your favourite cross-platform multimedia framework!
- The GStreamer team is proud to announce the second bugfix release in the stable
- 1.12 release series of your favourite cross-platform multimedia framework!
+ The 1.16 release series adds new features on top of the 1.14 series and is
+ part of the API and ABI-stable 1.x release series of the GStreamer multimedia
+ framework.
+ Full release notes will one day be found at:
- This release only contains bugfixes and it is safe to update from 1.12.x. For a
- full list of bugfixes see Bugzilla.
+ https://gstreamer.freedesktop.org/releases/1.16/
+ Binaries for Android, iOS, Mac OS X and Windows will usually be provided
+ shortly after the release.
- See /releases/1.12/ for the full release notes.
+ This module will not be very useful by itself and should be used in conjunction
+ with other GStreamer modules for a complete multimedia experience.
+ - gstreamer: provides the core GStreamer libraries and some generic plugins
- This module contains a set of reference plugins, base classes for other
- plugins, and helper libraries. It also includes essential elements such
- as audio and video format converters, and higher-level components like playbin,
- decodebin, encodebin, and discoverer.
+ - gst-plugins-base: a basic set of well-supported plugins and additional
+ media-specific GStreamer helper libraries for audio,
+ video, rtsp, rtp, tags, OpenGL, etc.
- This module is kept up-to-date together with the core developments. Element
- writers should look at the elements in this module as a reference for
- their development.
+ - gst-plugins-good: a set of well-supported plugins under our preferred
+ license
- This module contains elements for, among others:
+ - gst-plugins-ugly: a set of well-supported plugins which might pose
+ problems for distributors
- device plugins: x(v)imagesink, alsa, v4lsrc, cdparanoia
- containers: ogg
- codecs: vorbis, theora
- text: textoverlay, subparse
- sources: audiotestsrc, videotestsrc, giosrc
- network: tcp
- typefind functions
- audio processing: audioconvert, adder, audiorate, audioresample, volume
- visualisation: libvisual
- video processing: videoconvert, videoscale
- high-level components: playbin, uridecodebin, decodebin, encodebin, discoverer
- libraries: app, audio, fft, pbutils, riff, rtp, rtsp, sdp, tag, video
+ - gst-plugins-bad: a set of plugins of varying quality that have not made
+ their way into one of core/base/good/ugly yet, for one
+ reason or another. Many of these are are production quality
+ elements, but may still be missing documentation or unit
+ tests; others haven't passed the rigorous quality testing
+ we expect yet.
+ - gst-libav: a set of codecs plugins based on the ffmpeg library. This is
+ where you can find audio and video decoders and encoders
+ for a wide variety of formats including H.264, AAC, etc.
- Other modules containing plugins are:
+ - gstreamer-vaapi: hardware-accelerated video decoding and encoding using
+ VA-API on Linux. Primarily for Intel graphics hardware.
+ - gst-omx: hardware-accelerated video decoding and encoding, primarily for
+ embedded Linux systems that provide an OpenMax
+ implementation layer such as the Raspberry Pi.
- gst-plugins-good
- contains a set of well-supported plugins under our preferred license
- gst-plugins-ugly
- contains a set of well-supported plugins, but might pose problems for
- distributors
- gst-plugins-bad
- contains a set of less supported plugins that haven't passed the
- rigorous quality testing we expect, or are still missing documentation
- and/or unit tests
- gst-libav
- contains a set of codecs plugins based on libav (formerly gst-ffmpeg)
+ - gst-rtsp-server: library to serve files or streaming pipelines via RTSP
-
-
-
+ - gst-editing-services: library an plugins for non-linear editing
+Bugs fixed in this release
+
+ * 784639 : convertframe: Fix leak in case of vcrop is disalbed
+
==== Download ====
- You can find source releases of gst-plugins-base in the download
- directory: https://gstreamer.freedesktop.org/src/gst-plugins-base/
+ You can find source releases of gstreamer in the download
+ directory: https://gstreamer.freedesktop.org/src/gstreamer/
The git repository and details how to clone it can be found at
- http://cgit.freedesktop.org/gstreamer/gst-plugins-base/
+ https://gitlab.freedesktop.org/gstreamer/
==== Homepage ====
dnl this really should only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
- GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
+ GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_ALL_LDFLAGS"
AC_SUBST(GST_PLUGIN_LDFLAGS)
+dnl use tbm
+PKG_CHECK_MODULES(TBM, libdrm libtbm)
+AC_SUBST(TBM_CFLAGS)
+AC_SUBST(TBM_LIBS)
+
dnl *** output files ***
$MKDIR_P tests/check/orc
libgstallocators_@GST_API_VERSION@_la_SOURCES = \
gstfdmemory.c \
- gstdmabuf.c
+ gstphysmemory.c \
+ gstdmabuf.c
libgstallocators_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS) $(LIBM)
- libgstallocators_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+ libgstallocators_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) -DBUILDING_GST_ALLOCATORS
libgstallocators_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
+libgstallocators_@GST_API_VERSION@__la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+
+if USE_TBM
+libgstallocators_@GST_API_VERSION@_include_HEADERS += \
+ gsttizenmemory.h \
+ gsttizenbufferpool.h
+
+libgstallocators_@GST_API_VERSION@_la_SOURCES += \
+ gsttizenmemory.c \
+ gsttizenbufferpool.c
+
+libgstallocators_@GST_API_VERSION@_la_LIBADD += \
+ $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+ $(TBM_LIBS)
+
+libgstallocators_@GST_API_VERSION@_la_CFLAGS += $(TBM_CFLAGS)
+endif
if HAVE_INTROSPECTION
BUILT_GIRSOURCES = GstAllocators-@GST_API_VERSION@.gir
#ifndef __GST_ALLOCATORS_H__
#define __GST_ALLOCATORS_H__
+ #include <gst/allocators/allocators-prelude.h>
+
#include <gst/allocators/gstdmabuf.h>
#include <gst/allocators/gstfdmemory.h>
+ #include <gst/allocators/gstphysmemory.h>
+#ifdef USE_TBM
+#include <gst/allocators/gsttizenmemory.h>
+#include <gst/allocators/gsttizenbufferpool.h>
+#endif
+
#endif /* __GST_ALLOCATORS_H__ */
--- /dev/null
- #include "gsttizenmemory.h"
+/*
+ * GStreamer tizen buffer pool
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _GST_TIZEN_BUFFERPOOL_H_
+#define _GST_TIZEN_BUFFERPOOL_H_
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideometa.h>
+#include <gst/video/gstvideopool.h>
++#include <gst/allocators/gsttizenmemory.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GST_BUFFER_POOL_OPTION_TIZEN_META:
+ *
+ * An option that can be activated on bufferpool to request TizenVideo metadata
+ * on buffers from the pool.
+ */
+#define GST_BUFFER_POOL_OPTION_TIZEN_META "GstBufferPoolOptionTizenVideoMeta"
+
+typedef struct _GstTizenBufferPool GstTizenBufferPool;
+typedef struct _GstTizenBufferPoolClass GstTizenBufferPoolClass;
+typedef struct _GstTizenBufferPoolPrivate GstTizenBufferPoolPrivate;
+
+/* buffer pool functions */
+#define GST_TYPE_TIZEN_BUFFER_POOL (gst_tizen_buffer_pool_get_type())
+#define GST_IS_TIZEN_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIZEN_BUFFER_POOL))
+#define GST_TIZEN_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIZEN_BUFFER_POOL, GstTizenBufferPool))
+#define GST_TIZEN_BUFFER_POOL_CAST(obj) ((GstTizenBufferPool*)(obj))
+
+struct _GstTizenBufferPool
+{
+ GstBufferPool bufferpool;
+
+ GstAllocator *allocator;
+ GstVideoInfo info;
+
+ gboolean add_videometa;
+ gboolean add_tizenmeta;
+
+ GMutex lock;
+
+ GPtrArray *buffers;
+ gint current_buffer_index;
+ gint outstandings;
+ gboolean empty;
+
+ GstTizenBufferPoolPrivate *priv;
+};
+
+struct _GstTizenBufferPoolClass
+{
+ GstBufferPoolClass parent_class;
+};
+
++GST_ALLOCATORS_API
+GType gst_tizen_buffer_pool_get_type (void);
++
++GST_ALLOCATORS_API
+GstBufferPool *gst_tizen_buffer_pool_new (void);
+
+
+G_END_DECLS
+
+#endif /* _GST_TIZEN_BUFFER_POOL_H_ */
--- /dev/null
- #include <gst/gstallocator.h>
+/*
+ * GStreamer tizen memory
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#ifndef __GST_TIZEN_MEMORY_H__
+#define __GST_TIZEN_MEMORY_H__
+
+#include <gst/gst.h>
++#include <gst/allocators/allocators-prelude.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideometa.h>
-
++//#include <gst/gstallocator.h>
+#include <gst/gstmemory.h>
+#include <tbm_bufmgr.h>
+#include <tbm_surface.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GstTizenAllocator GstTizenAllocator;
+typedef struct _GstTizenAllocatorClass GstTizenAllocatorClass;
+typedef struct _GstTizenAllocatorPrivate GstTizenAllocatorPrivate;
+
+typedef struct _GstTizenMemory GstTizenMemory;
+#define GST_TYPE_TIZEN_ALLOCATOR (gst_tizen_allocator_get_type())
++
++GST_ALLOCATORS_API
+GType gst_tizen_allocator_get_type(void);
+
+#define GST_IS_TIZEN_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIZEN_ALLOCATOR))
+#define GST_IS_TIZEN_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TIZEN_ALLOCATOR))
+#define GST_TIZEN_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TIZEN_ALLOCATOR, GstTizenAllocatorClass))
+#define GST_TIZEN_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIZEN_ALLOCATOR, GstTizenAllocator))
+#define GST_TIZEN_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TIZEN_ALLOCATOR, GstTizenAllocatorClass))
+#define GST_TIZEN_ALLOCATOR_CAST(obj) ((GstTizenAllocator *)(obj))
+
+#define GST_TIZEN_MEMORY_TYPE "TizenVideoMemory"
+
+struct _GstTizenMemory
+{
+ GstMemory mem;
+
+ tbm_surface_h surface;
+ GstVideoInfo *info;
+
+ /* <protected> */
+ GMutex lock;
+
+ /* <private> */
+ GDestroyNotify notify;
+ gpointer user_data;
+
+};
+
+struct _GstTizenAllocatorPrivate
+{
+ GList *mem_cache;
+ GstAllocator *dmabuf_alloc;
+};
+
+/**
+ * GstTizenMemoryAllocator
+ *
+ * Base class for allocators with bo memory
+ */
+struct _GstTizenAllocator
+{
+ GstAllocator parent;
+ GstTizenAllocatorPrivate *priv;
+};
+
+
+struct _GstTizenAllocatorClass
+{
+ GstAllocatorClass parent_class;
+};
+
++GST_ALLOCATORS_API
+GstAllocator * gst_tizen_allocator_new (void);
+
++GST_ALLOCATORS_API
+GstMemory * gst_tizen_allocator_alloc (GstAllocator * allocator, GstVideoInfo * vinfo);
+
++GST_ALLOCATORS_API
+GstMemory * gst_tizen_allocator_alloc_surface (GstAllocator * allocator, GstVideoInfo * vinfo,
+ tbm_surface_h surface, gpointer user_data, GDestroyNotify notify);
+
++GST_ALLOCATORS_API
+gboolean gst_is_tizen_memory (GstMemory *mem);
+
++GST_ALLOCATORS_API
+gint gst_tizen_memory_get_num_bos (GstMemory *mem);
+
++GST_ALLOCATORS_API
+void * gst_tizen_memory_get_bos (GstMemory *mem, gint index);
+
++GST_ALLOCATORS_API
+void * gst_tizen_memory_get_surface (GstMemory *mem);
+
++GST_ALLOCATORS_API
+GstMemory * gst_tizen_allocator_dmabuf_export (GstAllocator * allocator, GstMemory *tmem, int bo_idx);
++
++GST_ALLOCATORS_API
+GstTizenMemory *gst_tizen_allocator_dmabuf_import (GstAllocator * allocator, gint * fds, gint planes, gsize offsets[4], GstVideoInfo * vinfo);
+
++GST_ALLOCATORS_API
+gboolean gst_tizen_video_memory_map (GstVideoMeta * meta, guint plane, GstMapInfo * info,
+ gpointer * data, gint * stride, GstMapFlags flags);
+
++GST_ALLOCATORS_API
+gboolean gst_tizen_video_memory_unmap (GstVideoMeta * meta, guint plane, GstMapInfo * info);
+
++GST_ALLOCATORS_API
+tbm_format gst_video_format_to_tbm_format (GstVideoFormat format);
+
+G_END_DECLS
+
+#endif /* _GST_TIZEN_MEMORY_H_ */
--- /dev/null
- guint strobe_caps; /**< Use above caps field */
- guint detection_caps; /**< Just boolean */
+/*
+ * GStreamer Camera Control Interface
+ *
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Jeongmo Yang <jm80.yang@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* ===========================================================================================
+EDIT HISTORY FOR MODULE
+
+ This section contains comments describing changes made to the module.
+ Notice that changes are listed in reverse chronological order.
+
+when who what, where, why
+--------- ------------------------ ------------------------------------------------------
+12/09/08 jm80.yang@samsung.com Created
+
+=========================================================================================== */
+
+#ifndef __GST_CAMERA_CONTROL_H__
+#define __GST_CAMERA_CONTROL_H__
+
+#include <gst/gst.h>
++#include <gst/video/video-prelude.h>
+#include <gst/video/cameracontrolchannel.h>
+//#include <gst/interfaces/interfaces-enumtypes.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_CAMERA_CONTROL \
+ (gst_camera_control_get_type())
+#define GST_CAMERA_CONTROL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CAMERA_CONTROL, GstCameraControl))
+#define GST_CAMERA_CONTROL_GET_CLASS(inst) \
+ (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_CAMERA_CONTROL, GstCameraControlClass))
+#define GST_CAMERA_CONTROL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_CAMERA_CONTROL, GstCameraControlClass))
+#define GST_IS_CAMERA_CONTROL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CAMERA_CONTROL))
+#define GST_IS_CAMERA_CONTROL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CAMERA_CONTROL))
+#define GST_CAMERA_CONTROL_TYPE(klass) (klass->camera_control_type)
+
+
+typedef struct _GstCameraControl GstCameraControl;
+
+typedef enum
+{
+ // TODO : V4L2 Extend
+ GST_CAMERA_CONTROL_HARDWARE,
+ GST_CAMERA_CONTROL_SOFTWARE
+} GstCameraControlType;
+
+/* enumerations for Camera control Exposure types */
+typedef enum
+{
+ GST_CAMERA_CONTROL_F_NUMBER,
+ GST_CAMERA_CONTROL_SHUTTER_SPEED,
+ GST_CAMERA_CONTROL_ISO,
+ GST_CAMERA_CONTROL_PROGRAM_MODE,
+ GST_CAMERA_CONTROL_EXPOSURE_MODE,
+ GST_CAMERA_CONTROL_EXPOSURE_VALUE
+} GstCameraControlExposureType;
+
+/* enumerations for Camera control Capture mode types */
+typedef enum
+{
+ GST_CAMERA_CONTROL_CAPTURE_MODE,
+ GST_CAMERA_CONTROL_OUTPUT_MODE,
+ GST_CAMERA_CONTROL_FRAME_COUNT,
+ GST_CAMERA_CONTROL_JPEG_QUALITY
+} GstCameraControlCaptureModeType;
+
+/* enumerations for Camera control Strobe types */
+typedef enum
+{
+ GST_CAMERA_CONTROL_STROBE_CONTROL,
+ GST_CAMERA_CONTROL_STROBE_CAPABILITIES,
+ GST_CAMERA_CONTROL_STROBE_MODE,
+ GST_CAMERA_CONTROL_STROBE_STATUS,
+ GST_CAMERA_CONTROL_STROBE_EV
+} GstCameraControlStrobeType;
+
+/* enumerations for Camera control Face detection types */
+typedef enum
+{
+ GST_CAMERA_CONTROL_FACE_DETECT_MODE,
+ GST_CAMERA_CONTROL_FACE_DETECT_NUMBER,
+ GST_CAMERA_CONTROL_FACE_FOCUS_SELECT,
+ GST_CAMERA_CONTROL_FACE_SELECT_NUMBER,
+ GST_CAMERA_CONTROL_FACE_DETECT_STATUS
+} GstCameraControlFaceDetectType;
+
+/* enumerations for Camera control Zoom types */
+typedef enum
+{
+ GST_CAMERA_CONTROL_DIGITAL_ZOOM,
+ GST_CAMERA_CONTROL_OPTICAL_ZOOM
+} GstCameraControlZoomType;
+
+/* enumerations for Camera control Part color */
+typedef enum
+{
+ GST_CAMERA_CONTROL_PART_COLOR_SRC,
+ GST_CAMERA_CONTROL_PART_COLOR_DST,
+ GST_CAMERA_CONTROL_PART_COLOR_MODE
+} GstCameraControlPartColorType;
+
+/* enumerations for Camera capture command */
+typedef enum
+{
+ GST_CAMERA_CONTROL_CAPTURE_COMMAND_NONE,
+ GST_CAMERA_CONTROL_CAPTURE_COMMAND_START,
+ GST_CAMERA_CONTROL_CAPTURE_COMMAND_STOP,
+ GST_CAMERA_CONTROL_CAPTURE_COMMAND_STOP_MULTISHOT
+} GstCameraControlCaptureCommand;
+
+/* enumerations for Camera record command */
+typedef enum
+{
+ GST_CAMERA_CONTROL_RECORD_COMMAND_NONE,
+ GST_CAMERA_CONTROL_RECORD_COMMAND_START,
+ GST_CAMERA_CONTROL_RECORD_COMMAND_STOP
+} GstCameraControlRecordCommand;
+
+/////////////////////////////////
+// For Query functionalities //
+// For Querying capabilities //
+/////////////////////////////////
+#define GST_CAMERA_CONTROL_MAX_NUM_FMT_DESC 32
+#define GST_CAMERA_CONTROL_MAX_NUM_RESOLUTION 32
+#define GST_CAMERA_CONTROL_MAX_NUM_AVAILABLE_TPF 16
+#define GST_CAMERA_CONTROL_MAX_NUM_AVAILABLE_FPS 16
+#define GST_CAMERA_CONTROL_MAX_NUM_CTRL_LIST_INFO 64
+#define GST_CAMERA_CONTROL_MAX_NUM_CTRL_MENU 64
+#define GST_CAMERA_CONTROL_MAX_NUM_DETECTED_FACES 16
+#define GST_CAMERA_CONTROL_MAX_SZ_CTRL_NAME_STRING 32
+#define GST_CAMERA_CONTROL_MAX_SZ_DEV_NAME_STRING 32
+
+/*! @struct GstCameraControlFracType
+ * @brief For timeperframe as fraction type
+ * Elapse time consumed by one frame, reverse of FPS
+ */
+typedef struct _GstCameraControlFracType {
+ gint num;
+ gint den;
+} GstCameraControlFracType;
+
+/*! @struct GstCameraControlRectType
+ * @brief For touch auto focusing area and face detection area
+ */
+typedef struct _GstCameraControlRectType {
+ gint x;
+ gint y;
+ gint width;
+ gint height;
+} GstCameraControlRectType;
+
+/*! @struct GstCameraControlResolutionType
+ * @brief For querying supported resolutions
+ */
+typedef struct _GstCameraControlResolutionType {
+ gint w;
+ gint h;
+
+ /* Available time per frame(tpf) as each pixelformat */
+ gint num_avail_tpf;
+ GstCameraControlFracType tpf[GST_CAMERA_CONTROL_MAX_NUM_AVAILABLE_TPF];
+} GstCameraControlResolutionType;
+
+/*! @struct GstCameraControlFmtDescType
+ * @brief For querying supported format type
+ */
+typedef struct _GstCameraControlFmtDescType {
+ /* fourcc name of each pixelformat */
+ guint fcc;
+ gint fcc_use;
+
+ /* Available resolutions as each pixelformat */
+ gint num_resolution;
+ GstCameraControlResolutionType resolutions[GST_CAMERA_CONTROL_MAX_NUM_RESOLUTION];
+} GstCameraControlFmtDescType;
+
+/*! @struct GstCameraControlCapsInfoType
+ * @brief For querying image input capabilities
+ */
+typedef struct _GstCameraControlCapsInfoType {
+ char dev_name[GST_CAMERA_CONTROL_MAX_SZ_DEV_NAME_STRING];
+ int input_idx;
+ gint num_fmt_desc;
+ GstCameraControlFmtDescType fmt_desc[GST_CAMERA_CONTROL_MAX_NUM_FMT_DESC];
+
+ int num_preview_resolution;
+ int preview_resolution_width[GST_CAMERA_CONTROL_MAX_NUM_RESOLUTION];
+ int preview_resolution_height[GST_CAMERA_CONTROL_MAX_NUM_RESOLUTION];
+
+ int num_capture_resolution;
+ int capture_resolution_width[GST_CAMERA_CONTROL_MAX_NUM_RESOLUTION];
+ int capture_resolution_height[GST_CAMERA_CONTROL_MAX_NUM_RESOLUTION];
+
+ int num_preview_fmt;
+ unsigned int preview_fmt[GST_CAMERA_CONTROL_MAX_NUM_FMT_DESC];
+
+ int num_capture_fmt;
+ unsigned int capture_fmt[GST_CAMERA_CONTROL_MAX_NUM_FMT_DESC];
+
+ int num_fps;
+ GstCameraControlFracType fps[GST_CAMERA_CONTROL_MAX_NUM_AVAILABLE_FPS];
+} GstCameraControlCapsInfoType;
+
+/*! @struct GstCameraControlFaceInfo
+ * @brief For face information
+ */
+typedef struct _GstCameraControlFaceInfo {
+ int id;
+ int score;
+ GstCameraControlRectType rect;
+} GstCameraControlFaceInfo;
+
+/*! @struct GstCameraControlFaceDetectInfo
+ * @brief For face detect information
+ */
+typedef struct _GstCameraControlFaceDetectInfo {
+ int num_of_faces;
+ GstCameraControlFaceInfo face_info[GST_CAMERA_CONTROL_MAX_NUM_DETECTED_FACES];
+} GstCameraControlFaceDetectInfo;
+
+/////////////////////////////
+// For Querying controls //
+/////////////////////////////
+enum {
+ GST_CAMERA_CTRL_TYPE_RANGE = 0,
+ GST_CAMERA_CTRL_TYPE_BOOL,
+ GST_CAMERA_CTRL_TYPE_ARRAY,
+ GST_CAMERA_CTRL_TYPE_UNKNOWN,
+ GST_CAMERA_CTRL_TYPE_NUM,
+};
+
+/*! @struct GstCameraControlCtrlMenuType
+ * @brief For querying menu of specified controls
+ */
+typedef struct _GstCameraControlCtrlMenuType {
+ gint menu_index;
+ gchar menu_name[GST_CAMERA_CONTROL_MAX_SZ_CTRL_NAME_STRING];
+} GstCameraControlCtrlMenuType;
+
+/*! @struct GstCameraControlCtrlInfoType
+ * @brief For querying controls detail
+ */
+typedef struct _GstCameraControlCtrlInfoType {
+ gint avsys_ctrl_id;
+ gint v4l2_ctrl_id;
+ gint ctrl_type;
+ gchar ctrl_name[GST_CAMERA_CONTROL_MAX_SZ_CTRL_NAME_STRING];
+ gint min;
+ gint max;
+ gint step;
+ gint default_val;
+ gint num_ctrl_menu;
+ GstCameraControlCtrlMenuType ctrl_menu[GST_CAMERA_CONTROL_MAX_NUM_CTRL_MENU];
+} GstCameraControlCtrlInfoType;
+
+/*! @struct GstCameraControlCtrlListInfoType
+ * @brief For querying controls
+ */
+typedef struct _GstCameraControlCtrlListInfoType {
+ gint num_ctrl_list_info;
+ GstCameraControlCtrlInfoType ctrl_info[GST_CAMERA_CONTROL_MAX_NUM_CTRL_LIST_INFO];
+} GstCameraControlCtrlListInfoType;
+
+/* capabilities field */
+#define GST_CAMERA_STROBE_CAP_NONE 0x0000 /* No strobe supported */
+#define GST_CAMERA_STROBE_CAP_OFF 0x0001 /* Always flash off mode */
+#define GST_CAMERA_STROBE_CAP_ON 0x0002 /* Always use flash light mode */
+#define GST_CAMERA_STROBE_CAP_AUTO 0x0004 /* Flashlight works automatic */
+#define GST_CAMERA_STROBE_CAP_REDEYE 0x0008 /* Red-eye reduction */
+#define GST_CAMERA_STROBE_CAP_SLOWSYNC 0x0010 /* Slow sync */
+#define GST_CAMERA_STROBE_CAP_FRONT_CURTAIN 0x0020 /* Front curtain */
+#define GST_CAMERA_STROBE_CAP_REAR_CURTAIN 0x0040 /* Rear curtain */
+#define GST_CAMERA_STROBE_CAP_PERMANENT 0x0080 /* keep turned on until turning off */
+#define GST_CAMERA_STROBE_CAP_EXTERNAL 0x0100 /* use external strobe */
+
+typedef struct _GstCameraControlExtraInfoType {
-
++ guint strobe_caps; /* Use above caps field */
++ guint detection_caps; /* Just boolean */
+ guint reserved[4];
+} GstCameraControlExtraInfoType;
+/////////////////////////////////////
+// END For Query functionalities //
+/////////////////////////////////////
+
+
+/* structure for Camera control EXIF information */
+typedef struct _GstCameraControlExifInfo {
+ /* Dynamic value */
+ guint32 exposure_time_numerator; /* Exposure time, given in seconds */
+ guint32 exposure_time_denominator;
+ gint shutter_speed_numerator; /* Shutter speed, given in APEX(Additive System Photographic Exposure) */
+ gint shutter_speed_denominator;
+ gint brigtness_numerator; /* Value of brightness, before firing flash, given in APEX value */
+ gint brightness_denominator;
+ guint16 iso; /* Sensitivity value of sensor */
+ guint16 flash; /* Whether flash is fired(1) or not(0) */
+ gint metering_mode; /* metering mode in EXIF 2.2 */
+ gint exif_image_width; /* Size of image */
+ gint exif_image_height;
+ gint exposure_bias_in_APEX; /* Exposure bias in APEX standard */
+ gint software_used; /* Firmware S/W version */
+
+ /* Fixed value */
+ gint component_configuration; /* color components arrangement */
+ gint colorspace; /* colorspace information */
+ gint focal_len_numerator; /* Lens focal length */
+ gint focal_len_denominator;
+ gint aperture_f_num_numerator; /* Aperture value */
+ gint aperture_f_num_denominator;
+ gint aperture_in_APEX; /* Aperture value in APEX standard */
+ gint max_lens_aperture_in_APEX; /* Max aperture value in APEX standard */
+} GstCameraControlExifInfo;
+
+/* structure for camera control class */
+typedef struct _GstCameraControlClass {
+ GTypeInterface klass;
+ GstCameraControlType camera_control_type;
+
+ /* virtual functions */
+ const GList* (*list_channels) (GstCameraControl *control);
+ gboolean (*set_value) (GstCameraControl *control, GstCameraControlChannel *control_channel, gint value);
+ gboolean (*get_value) (GstCameraControl *control, GstCameraControlChannel *control_channel, gint *value);
+ gboolean (*set_exposure) (GstCameraControl *control, gint type, gint value1, gint value2);
+ gboolean (*get_exposure) (GstCameraControl *control, gint type, gint *value1, gint *value2);
+ gboolean (*set_capture_mode) (GstCameraControl *control, gint type, gint value);
+ gboolean (*get_capture_mode) (GstCameraControl *control, gint type, gint *value);
+ gboolean (*set_strobe) (GstCameraControl *control, gint type, gint value);
+ gboolean (*get_strobe) (GstCameraControl *control, gint type, gint *value);
+ gboolean (*set_detect) (GstCameraControl *control, gint type, gint value);
+ gboolean (*get_detect) (GstCameraControl *control, gint type, gint *value);
+ gboolean (*set_zoom) (GstCameraControl *control, gint type, gint value);
+ gboolean (*get_zoom) (GstCameraControl *control, gint type, gint *value);
+ gboolean (*set_focus) (GstCameraControl *control, gint mode, gint range);
+ gboolean (*get_focus) (GstCameraControl *control, gint *mode, gint *range);
+ gboolean (*start_auto_focus) (GstCameraControl *control);
+ gboolean (*stop_auto_focus) (GstCameraControl *control);
+ gboolean (*set_focus_level) (GstCameraControl *control, gint manual_level);
+ gboolean (*get_focus_level) (GstCameraControl *control, gint *manual_level);
+ gboolean (*set_auto_focus_area) (GstCameraControl *control, GstCameraControlRectType rect);
+ gboolean (*get_auto_focus_area) (GstCameraControl *control, GstCameraControlRectType *rect);
+ gboolean (*set_wdr) (GstCameraControl *control, gint value);
+ gboolean (*get_wdr) (GstCameraControl *control, gint *value);
+ gboolean (*set_ahs) (GstCameraControl *control, gint value);
+ gboolean (*get_ahs) (GstCameraControl *control, gint *value);
+ gboolean (*set_part_color) (GstCameraControl *control, gint type, gint value);
+ gboolean (*get_part_color) (GstCameraControl *control, gint type, gint *value);
+ gboolean (*get_exif_info) (GstCameraControl *control, GstCameraControlExifInfo *info);
+ gboolean (*get_basic_dev_info) (GstCameraControl *control, gint dev_id, GstCameraControlCapsInfoType *info);
+ gboolean (*get_misc_dev_info) (GstCameraControl *control, gint dev_id, GstCameraControlCtrlListInfoType *info);
+ gboolean (*get_extra_dev_info) (GstCameraControl *control, gint dev_id, GstCameraControlExtraInfoType *info);
+ void (*set_capture_command) (GstCameraControl *control, GstCameraControlCaptureCommand cmd);
+ void (*set_record_command) (GstCameraControl *control, GstCameraControlRecordCommand cmd);
+ gboolean (*start_face_zoom) (GstCameraControl *control, gint x, gint y, gint zoom_level);
+ gboolean (*stop_face_zoom) (GstCameraControl *control);
+ gboolean (*set_ae_lock) (GstCameraControl *control, gboolean lock);
+ gboolean (*get_ae_lock) (GstCameraControl *control, gboolean *lock);
+ gboolean (*set_awb_lock) (GstCameraControl *control, gboolean lock);
+ gboolean (*get_awb_lock) (GstCameraControl *control, gboolean *lock);
+ gboolean (*set_user_buffer_fd) (GstCameraControl *control, int *fds, int number);
+
+ /* signals */
+ void (* value_changed) (GstCameraControl *control, GstCameraControlChannel *channel, gint value);
+} GstCameraControlClass;
+
++GST_VIDEO_API
+GType gst_camera_control_get_type(void);
+
- gboolean gst_camera_control_set_user_buffer_fd (GstCameraControl *control, int *fds, int number);
++GST_VIDEO_API
+const GList* gst_camera_control_list_channels (GstCameraControl *control);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_value (GstCameraControl *control, GstCameraControlChannel *control_channel, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_value (GstCameraControl *control, GstCameraControlChannel *control_channel, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_exposure (GstCameraControl *control, gint type, gint value1, gint value2);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_exposure (GstCameraControl *control, gint type, gint *value1, gint *value2);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_capture_mode (GstCameraControl *control, gint type, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_capture_mode (GstCameraControl *control, gint type, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_strobe (GstCameraControl *control, gint type, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_strobe (GstCameraControl *control, gint type, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_detect (GstCameraControl *control, gint type, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_detect (GstCameraControl *control, gint type, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_zoom (GstCameraControl *control, gint type, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_zoom (GstCameraControl *control, gint type, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_focus (GstCameraControl *control, gint mode, gint range);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_focus (GstCameraControl *control, gint *mode, gint *range);
++
++GST_VIDEO_API
+gboolean gst_camera_control_start_auto_focus (GstCameraControl *control);
++
++GST_VIDEO_API
+gboolean gst_camera_control_stop_auto_focus (GstCameraControl *control);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_focus_level (GstCameraControl *control, gint manual_level);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_focus_level (GstCameraControl *control, gint *manual_level);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_auto_focus_area (GstCameraControl *control, GstCameraControlRectType rect);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_auto_focus_area (GstCameraControl *control, GstCameraControlRectType *rect);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_wdr (GstCameraControl *control, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_wdr (GstCameraControl *control, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_ahs (GstCameraControl *control, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_ahs (GstCameraControl *control, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_part_color (GstCameraControl *control, gint type, gint value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_part_color (GstCameraControl *control, gint type, gint *value);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_exif_info (GstCameraControl *control, GstCameraControlExifInfo *info);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_basic_dev_info (GstCameraControl *control, gint dev_id, GstCameraControlCapsInfoType *info);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_misc_dev_info (GstCameraControl *control, gint dev_id, GstCameraControlCtrlListInfoType *info);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_extra_dev_info (GstCameraControl *control, gint dev_id, GstCameraControlExtraInfoType *info);
++
++GST_VIDEO_API
+void gst_camera_control_set_capture_command (GstCameraControl *control, GstCameraControlCaptureCommand cmd);
++
++GST_VIDEO_API
+void gst_camera_control_set_record_command (GstCameraControl *control, GstCameraControlRecordCommand cmd);
++
++GST_VIDEO_API
+gboolean gst_camera_control_start_face_zoom (GstCameraControl *control, gint x, gint y, gint zoom_level);
++
++GST_VIDEO_API
+gboolean gst_camera_control_stop_face_zoom (GstCameraControl *control);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_ae_lock (GstCameraControl *control, gboolean lock);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_ae_lock (GstCameraControl *control, gboolean *lock);
++
++GST_VIDEO_API
+gboolean gst_camera_control_set_awb_lock (GstCameraControl *control, gboolean lock);
++
++GST_VIDEO_API
+gboolean gst_camera_control_get_awb_lock (GstCameraControl *control, gboolean *lock);
+
++GST_VIDEO_API
++gboolean gst_camera_control_set_user_buffer_fd (GstCameraControl *control, int *fds, int number);
+
+/* trigger signal */
++GST_VIDEO_API
+void gst_camera_control_value_changed (GstCameraControl *control, GstCameraControlChannel *control_channel, gint value);
+
+G_END_DECLS
+
+#endif /* __GST_CAMERA_CONTROL_H__ */
--- /dev/null
+/* GStreamer Camera Control Channel Interface
+ *
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Jeongmo Yang <jm80.yang@samsung.com>
+ *
+ * cameracontrolchannel.h: individual channel object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_CAMERA_CONTROL_CHANNEL_H__
+#define __GST_CAMERA_CONTROL_CHANNEL_H__
+
+#include <gst/gst.h>
++#include <gst/video/video-prelude.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_CAMERA_CONTROL_CHANNEL \
+ (gst_camera_control_channel_get_type ())
+#define GST_CAMERA_CONTROL_CHANNEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CAMERA_CONTROL_CHANNEL, \
+ GstCameraControlChannel))
+#define GST_CAMERA_CONTROL_CHANNEL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_CAMERA_CONTROL_CHANNEL, \
+ GstCameraControlChannelClass))
+#define GST_IS_CAMERA_CONTROL_CHANNEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CAMERA_CONTROL_CHANNEL))
+#define GST_IS_CAMERA_CONTROL_CHANNEL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CAMERA_CONTROL_CHANNEL))
+
+typedef struct _GstCameraControlChannel {
+ GObject parent;
+ gchar *label;
+ gint min_value;
+ gint max_value;
+} GstCameraControlChannel;
+
+typedef struct _GstCameraControlChannelClass {
+ GObjectClass parent;
+
+ /* signals */
+ void (*value_changed)(GstCameraControlChannel *control_channel, gint value);
+
+ gpointer _gst_reserved[GST_PADDING];
+} GstCameraControlChannelClass;
+
++GST_VIDEO_API
+GType gst_camera_control_channel_get_type(void);
+
+G_END_DECLS
+
+#endif /* __GST_CAMERA_CONTROL_CHANNEL_H__ */
GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
goto invalid_buffer;
- out_map_flags))
+#ifdef USE_TBM
+ if (filter->out_info.finfo->format != GST_VIDEO_FORMAT_SN12)
+ out_map_flags |= GST_VIDEO_FRAME_MAP_FLAG_NO_REF;
+
+ if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
++ out_map_flags)) {
++ gst_video_frame_unmap (&in_frame);
+ goto invalid_buffer;
++ }
+#else
if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
- GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
+ GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) {
+ gst_video_frame_unmap (&in_frame);
goto invalid_buffer;
+ }
+#endif
res = fclass->transform_frame (filter, &in_frame, &out_frame);
gst_video_frame_unmap (&out_frame);
#include <glib.h>
#include <string.h>
#include <math.h>
++#ifdef USE_TBM
+#include <gst/allocators/gsttizenmemory.h>
++#endif
#include "video-orc.h"
convert_fill_border (convert, dest);
}
++#ifdef USE_TBM
+static void
+convert_I420_SN12 (GstVideoConverter * convert, const GstVideoFrame * src,
+ GstVideoFrame * dest )
+{
+ guint8 *mY, *mUV, *Y, *U, *V;
+ gint l1, l2;
+ int i, j;
+ gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
+
+ gint width = convert->in_width;
+ gint height = convert->in_height;
+
+ mY = mUV = Y = U = V = NULL;
+ mY = GST_VIDEO_FRAME_PLANE_DATA (dest, 0);
+ mUV = GST_VIDEO_FRAME_PLANE_DATA (dest, 1);
+
+ for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
+ GET_LINE_OFFSETS (interlaced, i, l1, l2);
+
+ Y = FRAME_GET_Y_LINE (src, l1);
+ memcpy(mY, Y, width);
+ mY += width;
+ Y = FRAME_GET_Y_LINE (src, l2);
+ memcpy(mY, Y, width);
+ mY += width;
+
+ U = FRAME_GET_U_LINE (src, i >> 1);
+ V = FRAME_GET_V_LINE (src, i >> 1);
+ for (j = 0; j < (width + 1) / 2; j++) {
+ *mUV++ = *U++;
+ *mUV++ = *V++;
+ }
+ }
+}
++#endif
+
static GstVideoFormat
get_scale_format (GstVideoFormat format, gint plane)
{
case GST_VIDEO_FORMAT_A444_10LE:
case GST_VIDEO_FORMAT_P010_10BE:
case GST_VIDEO_FORMAT_P010_10LE:
- case GST_VIDEO_FORMAT_ST12:
+ case GST_VIDEO_FORMAT_GRAY10_LE32:
+ case GST_VIDEO_FORMAT_NV12_10LE32:
+ case GST_VIDEO_FORMAT_NV16_10LE32:
+ case GST_VIDEO_FORMAT_NV12_10LE40:
+ case GST_VIDEO_FORMAT_BGR10A2_LE:
++#ifdef USE_TBM
+ case GST_VIDEO_FORMAT_SN12:
++ case GST_VIDEO_FORMAT_ST12:
++#endif
res = format;
g_assert_not_reached ();
break;
in_format = GST_VIDEO_INFO_FORMAT (in_info);
out_format = GST_VIDEO_INFO_FORMAT (out_info);
-
++#ifdef USE_TBM
+ if(out_format == GST_VIDEO_FORMAT_SN12) {
+ /* do nothing for SN12 output format */
+ return TRUE;
+ }
++#endif
switch (in_format) {
case GST_VIDEO_FORMAT_RGB15:
case GST_VIDEO_FORMAT_RGB16:
return FALSE;
}
break;
++#ifdef USE_TBM
+ case GST_VIDEO_FORMAT_SN12:
+ return TRUE; /* do nothing for SN12 format */
++#endif
default:
break;
}
TRUE, FALSE, FALSE, FALSE, 0, 0, convert_scale_planes},
{GST_VIDEO_FORMAT_I420, GST_VIDEO_FORMAT_Y444, FALSE, FALSE, FALSE, TRUE,
TRUE, FALSE, FALSE, FALSE, 0, 0, convert_scale_planes},
++#ifdef USE_TBM
+ {GST_VIDEO_FORMAT_I420, GST_VIDEO_FORMAT_SN12, FALSE, FALSE, FALSE, TRUE,
+ TRUE, FALSE, FALSE, FALSE, 0, 0, convert_I420_SN12},
++#endif
{GST_VIDEO_FORMAT_I420, GST_VIDEO_FORMAT_GRAY8, FALSE, FALSE, FALSE, TRUE,
TRUE, FALSE, FALSE, FALSE, 0, 0, convert_scale_planes},
{GST_VIDEO_FORMAT_I420, GST_VIDEO_FORMAT_A420, FALSE, FALSE, FALSE, TRUE,
}
}
+ #define PACK_GRAY10_LE32 GST_VIDEO_FORMAT_AYUV64, unpack_GRAY10_LE32, 1, pack_GRAY10_LE32
+ static void
+ unpack_GRAY10_LE32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+ {
+ gint i;
+ const guint32 *restrict sy = GET_PLANE_LINE (0, y);
+ guint16 *restrict d = dest;
+ gint num_words = (width + 2) / 3;
+
+ /* Y data is packed into little endian 32bit words, with the 2 MSB being
+ * padding. There is only 1 pattern.
+ * -> padding | Y1 | Y2 | Y3
+ */
+
+ for (i = 0; i < num_words; i++) {
+ gint num_comps = MIN (3, width - i * 3);
+ guint pix = i * 3;
+ gsize doff = pix * 4;
+ gint c;
+ guint32 Y;
+
+ Y = GST_READ_UINT32_LE (sy + i);
+
+ for (c = 0; c < num_comps; c++) {
+ guint16 Yn;
+
+ /* For Y, we simply read 10 bit and shift it out */
+ Yn = (Y & 0x03ff) << 6;
+ Y >>= 10;
+
+ if (G_UNLIKELY (pix + c < x))
+ continue;
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE))
+ Yn |= Yn >> 10;
+
+ d[doff + 0] = 0xffff;
+ d[doff + 1] = Yn;
+ d[doff + 2] = 0x8000;
+ d[doff + 3] = 0x8000;
+
+ doff += 4;
+ }
+ }
+ }
+
+ static void
+ pack_GRAY10_LE32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+ {
+ gint i;
+ guint32 *restrict dy = GET_PLANE_LINE (0, y);
+ const guint16 *restrict s = src;
+ gint num_words = (width + 2) / 3;
+
+ for (i = 0; i < num_words; i++) {
+ gint num_comps = MIN (3, width - i * 3);
+ guint pix = i * 3;
+ gsize soff = pix * 4;
+ gint c;
+ guint32 Y = 0;
+
+ for (c = 0; c < num_comps; c++) {
+ Y |= s[soff + 1] >> 6 << (10 * c);
+ soff += 4;
+ }
+
+ GST_WRITE_UINT32_LE (dy + i, Y);
+ }
+ }
+
+ #define PACK_NV12_10LE32 GST_VIDEO_FORMAT_AYUV64, unpack_NV12_10LE32, 1, pack_NV12_10LE32
+ static void
+ unpack_NV12_10LE32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+ {
+ gint i;
+ gint uv = GET_UV_420 (y, flags);
+ const guint32 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint32 *restrict suv = GET_PLANE_LINE (1, uv);
+ guint16 *restrict d = dest;
+ gint num_words = (width + 2) / 3;
+ guint32 UV = 0;
+ guint16 Un = 0, Vn = 0;
+
+ /* Y data is packed into little endian 32bit words, with the 2 MSB being
+ * padding. There is only 1 pattern.
+ * -> padding | Y1 | Y2 | Y3
+ *
+ * UV is packed the same way, though we end up with 2 patterns:
+ * -> U | V | U | padding
+ * -> V | U | V | padding
+ */
+
+ /* FIXME unroll the 6 states ? */
+
+ for (i = 0; i < num_words; i++) {
+ gint num_comps = MIN (3, width - i * 3);
+ guint pix = i * 3;
+ gsize doff = pix * 4;
+ gint c;
+ guint32 Y;
+
+ Y = GST_READ_UINT32_LE (sy + i);
+
+ for (c = 0; c < num_comps; c++) {
+ guint16 Yn;
+
+ /* For Y, we simply read 10 bit and shift it out */
+ Yn = (Y & 0x03ff) << 6;
+ Y >>= 10;
+
+ /* Unpacking UV has been reduced to a cycle of 6 states. The following
+ * code is a reduce version of:
+ * 0: - Read first UV word (UVU)
+ * Unpack U and V
+ * 1: - Resued U/V from 1 (sub-sampling)
+ * 2: - Unpack remaining U value
+ * - Read following UV word (VUV)
+ * - Unpack V value
+ * 3: - Reuse U/V from 2 (sub-sampling)
+ * 4: - Unpack remaining U
+ * - Unpack remaining V
+ * 5: - Reuse UV/V from 4 (sub-sampling)
+ */
+ switch ((pix + c) % 6) {
+ case 0:
+ UV = GST_READ_UINT32_LE (suv + i);
+ /* fallthrough */
+ case 4:
+ Un = (UV & 0x03ff) << 6;
+ UV >>= 10;
+ Vn = (UV & 0x03ff) << 6;
+ UV >>= 10;
+ break;
+ case 2:
+ Un = (UV & 0x03ff) << 6;
+ UV = GST_READ_UINT32_LE (suv + i + 1);
+ Vn = (UV & 0x03ff) << 6;
+ UV >>= 10;
+ break;
+ default:
+ /* keep value */
+ break;
+ }
+
+ if (G_UNLIKELY (pix + c < x))
+ continue;
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
+ Yn |= Yn >> 10;
+ Un |= Un >> 10;
+ Vn |= Vn >> 10;
+ }
+
+ d[doff + 0] = 0xffff;
+ d[doff + 1] = Yn;
+ d[doff + 2] = Un;
+ d[doff + 3] = Vn;
+
+ doff += 4;
+ }
+ }
+ }
+
+ static void
+ pack_NV12_10LE32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+ {
+ gint i;
+ gint uv = GET_UV_420 (y, flags);
+ guint32 *restrict dy = GET_PLANE_LINE (0, y);
+ guint32 *restrict duv = GET_PLANE_LINE (1, uv);
+ const guint16 *restrict s = src;
+ gint num_words = (width + 2) / 3;
+ guint32 UV = 0;
+
+ /* FIXME unroll the 6 states ? */
+
+ for (i = 0; i < num_words; i++) {
+ gint num_comps = MIN (3, width - i * 3);
+ guint pix = i * 3;
+ gsize soff = pix * 4;
+ gint c;
+ guint32 Y = 0;
+
+ for (c = 0; c < num_comps; c++) {
+ Y |= s[soff + 1] >> 6 << (10 * c);
+
+ if (IS_CHROMA_LINE_420 (y, flags)) {
+ switch ((pix + c) % 6) {
+ case 0:
+ UV = s[soff + 2] >> 6;
+ UV |= s[soff + 3] >> 6 << 10;
+ break;
+ case 2:
+ UV |= s[soff + 2] >> 6 << 20;
+ GST_WRITE_UINT32_LE (duv + i, UV);
+ UV = s[soff + 3] >> 6;
+ break;
+ case 4:
+ UV |= s[soff + 2] >> 6 << 10;
+ UV |= s[soff + 3] >> 6 << 20;
+ GST_WRITE_UINT32_LE (duv + i, UV);
+ break;
+ default:
+ /* keep value */
+ break;
+ }
+ }
+
+ soff += 4;
+ }
+
+ GST_WRITE_UINT32_LE (dy + i, Y);
+
+ if (IS_CHROMA_LINE_420 (y, flags) && num_comps < 3)
+ GST_WRITE_UINT32_LE (duv + i, UV);
+
+ }
+ }
+
+ #define PACK_NV16_10LE32 GST_VIDEO_FORMAT_AYUV64, unpack_NV16_10LE32, 1, pack_NV16_10LE32
+ static void
+ unpack_NV16_10LE32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+ {
+ gint i;
+ const guint32 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint32 *restrict suv = GET_PLANE_LINE (1, y);
+ guint16 *restrict d = dest;
+ gint num_words = (width + 2) / 3;
+ guint32 UV = 0;
+ guint16 Un = 0, Vn = 0;
+
+ /* Y data is packed into little endian 32bit words, with the 2 MSB being
+ * padding. There is only 1 pattern.
+ * -> padding | Y1 | Y2 | Y3
+ *
+ * UV is packed the same way, though we end up with 2 patterns:
+ * -> U | V | U | padding
+ * -> V | U | V | padding
+ */
+
+ /* FIXME unroll the 6 states ? */
+
+ for (i = 0; i < num_words; i++) {
+ gint num_comps = MIN (3, width - i * 3);
+ guint pix = i * 3;
+ gsize doff = pix * 4;
+ gint c;
+ guint32 Y;
+
+ Y = GST_READ_UINT32_LE (sy + i);
+
+ for (c = 0; c < num_comps; c++) {
+ guint16 Yn;
+
+ /* For Y, we simply read 10 bit and shift it out */
+ Yn = (Y & 0x03ff) << 6;
+ Y >>= 10;
+
+ /* Unpacking UV has been reduced to a cycle of 6 states. The following
+ * code is a reduce version of:
+ * 0: - Read first UV word (UVU)
+ * Unpack U and V
+ * 1: - Resued U/V from 1 (sub-sampling)
+ * 2: - Unpack remaining U value
+ * - Read following UV word (VUV)
+ * - Unpack V value
+ * 3: - Reuse U/V from 2 (sub-sampling)
+ * 4: - Unpack remaining U
+ * - Unpack remaining V
+ * 5: - Reuse UV/V from 4 (sub-sampling)
+ */
+ switch ((pix + c) % 6) {
+ case 0:
+ UV = GST_READ_UINT32_LE (suv + i);
+ /* fallthrough */
+ case 4:
+ Un = (UV & 0x03ff) << 6;
+ UV >>= 10;
+ Vn = (UV & 0x03ff) << 6;
+ UV >>= 10;
+ break;
+ case 2:
+ Un = (UV & 0x03ff) << 6;
+ UV = GST_READ_UINT32_LE (suv + i + 1);
+ Vn = (UV & 0x03ff) << 6;
+ UV >>= 10;
+ break;
+ default:
+ /* keep value */
+ break;
+ }
+
+ if (G_UNLIKELY (pix + c < x))
+ continue;
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
+ Yn |= Yn >> 10;
+ Un |= Un >> 10;
+ Vn |= Vn >> 10;
+ }
+
+ d[doff + 0] = 0xffff;
+ d[doff + 1] = Yn;
+ d[doff + 2] = Un;
+ d[doff + 3] = Vn;
+
+ doff += 4;
+ }
+ }
+ }
+
+ static void
+ pack_NV16_10LE32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+ {
+ gint i;
+ guint32 *restrict dy = GET_PLANE_LINE (0, y);
+ guint32 *restrict duv = GET_PLANE_LINE (1, y);
+ const guint16 *restrict s = src;
+ gint num_words = (width + 2) / 3;
+ guint32 UV = 0;
+
+ /* FIXME unroll the 6 states ? */
+
+ for (i = 0; i < num_words; i++) {
+ gint num_comps = MIN (3, width - i * 3);
+ guint pix = i * 3;
+ gsize soff = pix * 4;
+ gint c;
+ guint32 Y = 0;
+
+ for (c = 0; c < num_comps; c++) {
+ Y |= s[soff + 1] >> 6 << (10 * c);
+
+ switch ((pix + c) % 6) {
+ case 0:
+ UV = s[soff + 2] >> 6;
+ UV |= s[soff + 3] >> 6 << 10;
+ break;
+ case 2:
+ UV |= s[soff + 2] >> 6 << 20;
+ GST_WRITE_UINT32_LE (duv + i, UV);
+ UV = s[soff + 3] >> 6;
+ break;
+ case 4:
+ UV |= s[soff + 2] >> 6 << 10;
+ UV |= s[soff + 3] >> 6 << 20;
+ GST_WRITE_UINT32_LE (duv + i, UV);
+ break;
+ default:
+ /* keep value */
+ break;
+ }
+
+ soff += 4;
+ }
+
+ GST_WRITE_UINT32_LE (dy + i, Y);
+
+ if (num_comps < 3)
+ GST_WRITE_UINT32_LE (duv + i, UV);
+ }
+ }
+
+ #define PACK_NV12_10LE40 GST_VIDEO_FORMAT_AYUV64, unpack_NV12_10LE40, 1, pack_NV12_10LE40
+ static void
+ unpack_NV12_10LE40 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+ {
+ gint i;
+ gint uv = GET_UV_420 (y, flags);
+ guint16 *restrict d = dest;
+ const guint8 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint8 *restrict suv = GET_PLANE_LINE (1, uv);
+ guint16 Y0 = 0, Y1 = 0, Yn = 0, Un = 0, Vn = 0;
+ guint32 UV = 0;
+
+ for (i = 0; i < width; i++) {
+ gboolean update_c = FALSE;
+
+ switch (i & 3) {
+ case 0:
+ Y0 = GST_READ_UINT16_LE (sy);
+ Yn = Y0 & 0x3ff;
+ sy += 2;
+
+ UV = GST_READ_UINT32_LE (suv);
+ Un = UV & 0x3ff;
+ Vn = (UV >> 10) & 0x3ff;
+ suv += 4;
+
+ Yn <<= 6;
+ Un <<= 6;
+ Vn <<= 6;
+ update_c = TRUE;
+ break;
+ case 1:
+ Y1 = GST_READ_UINT16_LE (sy);
+ Yn = (Y0 >> 10) | ((Y1 & 0xf) << 6);
+ sy += 2;
+
+ Yn <<= 6;
+ break;
+ case 2:
+ Yn = (Y1 >> 4) & 0x3ff;
+
+ Un = (UV >> 20) & 0x3ff;
+ Vn = (UV >> 30);
+ UV = GST_READ_UINT8 (suv);
+ Vn |= (UV << 2);
+ suv++;
+
+ Yn <<= 6;
+ Un <<= 6;
+ Vn <<= 6;
+ update_c = TRUE;
+ break;
+ case 3:
+ Y0 = GST_READ_UINT8 (sy);
+ Yn = (Y1 >> 14) | (Y0 << 2);
+ sy++;
+
+ Yn <<= 6;
+ break;
+ }
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
+ Yn |= Yn >> 10;
+ if (update_c) {
+ Un |= Un >> 10;
+ Vn |= Vn >> 10;
+ }
+ }
+
+ d[i * 4 + 0] = 0xffff;
+ d[i * 4 + 1] = Yn;
+ d[i * 4 + 2] = Un;
+ d[i * 4 + 3] = Vn;
+ }
+ }
+
+ static void
+ pack_NV12_10LE40 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+ {
+ gint i;
+ gint uv = GET_UV_420 (y, flags);
+ guint8 *restrict dy = GET_PLANE_LINE (0, y);
+ guint8 *restrict duv = GET_PLANE_LINE (1, uv);
+ guint16 Y0 = 0, Y1 = 0, Y2 = 0, Y3 = 0, U0, V0 = 0, U1 = 0, V1 = 0;
+ const guint16 *restrict s = src;
+
+ for (i = 0; i < width; i++) {
+ switch (i & 3) {
+ case 0:
+ Y0 = s[i * 4 + 1] >> 6;
+ GST_WRITE_UINT8 (dy, Y0 & 0xff);
+ dy++;
+
+ if (IS_CHROMA_LINE_420 (y, flags)) {
+ U0 = s[i * 4 + 2] >> 6;
+ V0 = s[i * 4 + 3] >> 6;
+
+ GST_WRITE_UINT8 (duv, U0 & 0xff);
+ duv++;
+
+ GST_WRITE_UINT8 (duv, (U0 >> 8) | ((V0 & 0x3f) << 2));
+ duv++;
+ }
+ break;
+ case 1:
+ Y1 = s[i * 4 + 1] >> 6;
+ GST_WRITE_UINT8 (dy, (Y0 >> 8) | ((Y1 & 0x3f) << 2));
+ dy++;
+ break;
+ case 2:
+ Y2 = s[i * 4 + 1] >> 6;
+ GST_WRITE_UINT8 (dy, (Y1 >> 6) | ((Y2 & 0xf) << 4));
+ dy++;
+
+ if (IS_CHROMA_LINE_420 (y, flags)) {
+ U1 = s[i * 4 + 2] >> 6;
+ V1 = s[i * 4 + 3] >> 6;
+
+ GST_WRITE_UINT8 (duv, (V0 >> 6) | ((U1 & 0xf) << 4));
+ duv++;
+
+ GST_WRITE_UINT8 (duv, (U1 >> 4) | ((V1 & 0x3) << 6));
+ duv++;
+
+ GST_WRITE_UINT8 (duv, V1 >> 2);
+ duv++;
+ }
+ break;
+ case 3:
+ Y3 = s[i * 4 + 1] >> 6;
+ GST_WRITE_UINT8 (dy, (Y2 >> 4) | ((Y3 & 0x3) << 6));
+ dy++;
+ GST_WRITE_UINT8 (dy, (Y3 >> 2));
+ dy++;
+ break;
+ }
+ }
+
+ switch (width & 3) {
+ case 0:
+ break;
+ case 1:
+ GST_WRITE_UINT8 (dy, Y0 >> 8);
+ if (IS_CHROMA_LINE_420 (y, flags))
+ GST_WRITE_UINT8 (duv, V0 >> 6);
+ break;
+ case 2:
+ GST_WRITE_UINT8 (dy, Y1 >> 6);
+ if (IS_CHROMA_LINE_420 (y, flags))
+ GST_WRITE_UINT8 (duv, V0 >> 6);
+ break;
+ case 3:
+ GST_WRITE_UINT8 (dy, Y2 >> 4);
+ break;
+ }
+ }
+
+ #define PACK_VUYA GST_VIDEO_FORMAT_AYUV, unpack_VUYA, 1, pack_VUYA
+ static void
+ unpack_VUYA (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+ {
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
+
+ s += x * 4;
+
+ video_orc_unpack_VUYA (d, s, width);
+ }
+
+ static void
+ pack_VUYA (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+ {
+ const guint8 *restrict s = src;
+ guint8 *restrict d = GET_LINE (y);
+
+ video_orc_pack_VUYA (d, s, width);
+ }
+
+ #define PACK_BGR10A2_LE GST_VIDEO_FORMAT_ARGB64, unpack_bgr10a2_le, 1, pack_bgr10a2_le
+ static void
+ unpack_bgr10a2_le (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+ {
+ int i;
+ const guint8 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
+ guint32 ARGB;
+ guint16 A, R, G, B;
+
+ s += x * 4;
+
+ for (i = 0; i < width; i++) {
+ ARGB = GST_READ_UINT32_LE (s + 4 * i);
+
+ B = ((ARGB >> 0) & 0x3ff) << 6;
+ G = ((ARGB >> 10) & 0x3ff) << 6;
+ R = ((ARGB >> 20) & 0x3ff) << 6;
+ A = ((ARGB >> 30) & 0x03) << 14;
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
+ B |= (B >> 10);
+ G |= (G >> 10);
+ R |= (R >> 10);
+ A |= (A >> 10);
+ }
+
+ d[4 * i + 0] = A;
+ d[4 * i + 1] = R;
+ d[4 * i + 2] = G;
+ d[4 * i + 3] = B;
+ }
+ }
+
+ static void
+ pack_bgr10a2_le (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+ {
+ int i;
+ guint32 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
+ guint32 ARGB;
+ guint16 A, R, G, B;
+
+ for (i = 0; i < width; i++) {
+ A = s[4 * i] & 0xc000;
+ R = s[4 * i + 1] & 0xffc0;
+ G = s[4 * i + 2] & 0xffc0;
+ B = s[4 * i + 3] & 0xffc0;
+
+ ARGB = (B >> 6) | (G << 4) | (R << 14) | (A << 16);
+
+ GST_WRITE_UINT32_LE (d + i, ARGB);
+ }
+ }
+
+#define PACK_INVZ16_LE GST_VIDEO_FORMAT_AYUV64, unpack_INVZ16_LE, 1, pack_INVZ16_LE
+static void
+unpack_INVZ16_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+{
+ int i;
+ const guint16 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
+
+ s += x;
+
+ for (i = 0; i < width; i++) {
+ d[i * 4 + 0] = 0xffff;
+ d[i * 4 + 1] = GST_READ_UINT16_LE (s + i);
+ d[i * 4 + 2] = 0x8000;
+ d[i * 4 + 3] = 0x8000;
+ }
+}
+
+static void
+pack_INVZ16_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+{
+ int i;
+ guint16 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
+
+ for (i = 0; i < width; i++) {
+ GST_WRITE_UINT16_LE (d + i, s[i * 4 + 1]);
+ }
+}
+
typedef struct
{
guint32 fourcc;
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY, depth, pstride, plane, offs, sub, pack } }
#define MAKE_GRAY_LE_FORMAT(name, desc, depth, pstride, plane, offs, sub, pack) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub, pack } }
+ #define MAKE_GRAY_C_LE_FORMAT(name, desc, depth, pstride, plane, offs, sub, pack) \
+ { 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY | GST_VIDEO_FORMAT_FLAG_COMPLEX | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub, pack } }
+#define MAKE_DEPTH_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub, pack) \
+ { fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub, pack } }
+
static const VideoFormat formats[] = {
{0x00000000, {GST_VIDEO_FORMAT_UNKNOWN, "UNKNOWN", "unknown video", 0, DPTH0,
PSTR0, PLANE_NA, OFFS0}},
PSTR222, PLANE012, OFFS0, SUB444, PACK_Y444_12BE),
MAKE_YUV_LE_FORMAT (Y444_12LE, "raw video", 0x00000000, DPTH12_12_12,
PSTR222, PLANE012, OFFS0, SUB444, PACK_Y444_12LE),
- #endif
+ MAKE_GRAY_C_LE_FORMAT (GRAY10_LE32, "raw video", DPTH10, PSTR0, PLANE0, OFFS0,
+ SUB4, PACK_GRAY10_LE32),
+ MAKE_YUV_C_LE_FORMAT (NV12_10LE32, "raw video",
+ GST_MAKE_FOURCC ('X', 'V', '1', '5'), DPTH10_10_10, PSTR0, PLANE011,
+ OFFS001, SUB420, PACK_NV12_10LE32),
+ MAKE_YUV_C_LE_FORMAT (NV16_10LE32, "raw video",
+ GST_MAKE_FOURCC ('X', 'V', '2', '0'), DPTH10_10_10, PSTR0, PLANE011,
+ OFFS001, SUB422, PACK_NV16_10LE32),
+ MAKE_YUV_C_LE_FORMAT (NV12_10LE40, "raw video",
+ GST_MAKE_FOURCC ('R', 'K', '2', '0'), DPTH10_10_10, PSTR0, PLANE011,
+ OFFS0, SUB420, PACK_NV12_10LE40),
+ MAKE_YUV_FORMAT (Y210, "raw video", GST_MAKE_FOURCC ('Y', '2', '1', '0'),
+ DPTH10_10_10, PSTR488, PLANE0, OFFS0, SUB422, PACK_Y210),
+ MAKE_YUV_FORMAT (Y410, "raw video", GST_MAKE_FOURCC ('Y', '4', '1', '0'),
+ DPTH10_10_10_2, PSTR0, PLANE0, OFFS0, SUB4444, PACK_Y410),
+ MAKE_YUVA_PACK_FORMAT (VUYA, "raw video", GST_MAKE_FOURCC ('V', 'U', 'Y',
+ 'A'), DPTH8888, PSTR4444, PLANE0, OFFS2103, SUB4444, PACK_VUYA),
+ MAKE_RGBA_LE_PACK_FORMAT (BGR10A2_LE, "raw video", DPTH10_10_10_2, PSTR4444,
+ PLANE0,
+ OFFS0, SUB4444, PACK_BGR10A2_LE),
+ MAKE_DEPTH_FORMAT (INVZ, "raw video", GST_MAKE_FOURCC ('I', 'N', 'V', 'Z'),
+ DPTH16, PSTR2, PLANE0, OFFS0, SUB4, PACK_INVZ16_LE),
+#ifdef TIZEN_PROFILE_TV
+ MAKE_YUV_FORMAT (STV0, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '0'),
+ DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
+ MAKE_YUV_FORMAT (STV1, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '1'),
+ DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
++#endif
};
static GstVideoFormat
return GST_VIDEO_FORMAT_YVYU;
case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'):
return GST_VIDEO_FORMAT_UYVY;
- return GST_VIDEO_FORMAT_ITLV;
+ case GST_MAKE_FOURCC ('I', 'T', 'L', 'V'):
++ return GST_VIDEO_FORMAT_ITLV;
case GST_MAKE_FOURCC ('V', 'Y', 'U', 'Y'):
return GST_VIDEO_FORMAT_VYUY;
case GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'):
return GST_VIDEO_FORMAT_v210;
case GST_MAKE_FOURCC ('v', '2', '1', '6'):
return GST_VIDEO_FORMAT_v216;
+ case GST_MAKE_FOURCC ('Y', '2', '1', '0'):
+ return GST_VIDEO_FORMAT_Y210;
case GST_MAKE_FOURCC ('N', 'V', '1', '2'):
return GST_VIDEO_FORMAT_NV12;
+ case GST_MAKE_FOURCC ('S', 'N', '1', '2'):
+ return GST_VIDEO_FORMAT_SN12;
+ case GST_MAKE_FOURCC ('S', 'T', '1', '2'):
+ return GST_VIDEO_FORMAT_ST12;
case GST_MAKE_FOURCC ('N', 'V', '2', '1'):
return GST_VIDEO_FORMAT_NV21;
+ case GST_MAKE_FOURCC ('S', 'N', '2', '1'):
+ return GST_VIDEO_FORMAT_SN21;
case GST_MAKE_FOURCC ('N', 'V', '1', '6'):
return GST_VIDEO_FORMAT_NV16;
case GST_MAKE_FOURCC ('N', 'V', '6', '1'):
return GST_VIDEO_FORMAT_IYU1;
case GST_MAKE_FOURCC ('A', 'Y', '6', '4'):
return GST_VIDEO_FORMAT_AYUV64;
-
+ case GST_MAKE_FOURCC ('X', 'V', '1', '0'):
+ return GST_VIDEO_FORMAT_GRAY10_LE32;
+ case GST_MAKE_FOURCC ('X', 'V', '1', '5'):
+ return GST_VIDEO_FORMAT_NV12_10LE32;
+ case GST_MAKE_FOURCC ('X', 'V', '2', '0'):
+ return GST_VIDEO_FORMAT_NV16_10LE32;
+ case GST_MAKE_FOURCC ('R', 'K', '2', '0'):
+ return GST_VIDEO_FORMAT_NV12_10LE40;
+ case GST_MAKE_FOURCC ('Y', '4', '1', '0'):
+ return GST_VIDEO_FORMAT_Y410;
+ case GST_MAKE_FOURCC ('V', 'U', 'Y', 'A'):
+ return GST_VIDEO_FORMAT_VUYA;
+ case GST_MAKE_FOURCC ('A', 'R', '3', '0'):
+ return GST_VIDEO_FORMAT_BGR10A2_LE;
+ case GST_MAKE_FOURCC ('I', 'N', 'V', 'Z'):
+ return GST_VIDEO_FORMAT_INVZ;
default:
return GST_VIDEO_FORMAT_UNKNOWN;
}
GST_VIDEO_FORMAT_I422_12LE,
GST_VIDEO_FORMAT_Y444_12BE,
GST_VIDEO_FORMAT_Y444_12LE,
- GST_VIDEO_FORMAT_STV1, /* TIZEN_PROFILE_TV */
+ GST_VIDEO_FORMAT_GRAY10_LE32,
+ GST_VIDEO_FORMAT_NV12_10LE32,
+ GST_VIDEO_FORMAT_NV16_10LE32,
+ GST_VIDEO_FORMAT_NV12_10LE40,
+ GST_VIDEO_FORMAT_Y210,
+ GST_VIDEO_FORMAT_Y410,
+ GST_VIDEO_FORMAT_VUYA,
+ GST_VIDEO_FORMAT_BGR10A2_LE,
+ GST_VIDEO_FORMAT_INVZ,
+ GST_VIDEO_FORMAT_STV0, /* TIZEN_PROFILE_TV */
++ GST_VIDEO_FORMAT_STV1, /* TIZEN_PROFILE_TV */
} GstVideoFormat;
#define GST_VIDEO_MAX_PLANES 4
# define GST_VIDEO_OE(s) G_STRINGIFY(s)"_LE"
#endif
- #define GST_VIDEO_FORMATS_ALL "{ I420, S420, YV12, YUY2, UYVY, AYUV, RGBx, " \
-#define GST_VIDEO_FORMATS_ALL "{ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, " \
-- "BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, " \
- "Y444, v210, v216, NV12, SN12, ST12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, " \
- "Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, " \
-- "BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, " \
-- "AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, " \
-- "Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, " \
-- "A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, " \
- "P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, " \
- "P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, " \
-- "GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, " \
- "Y444_12BE, Y444_12LE, INVZ }"
- "Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }"
++#define GST_VIDEO_FORMATS_ALL "{ I420, S420, YV12, YUY2, UYVY, ITLV, AYUV, " \
++ "RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, SR32, ARGB, ABGR, RGB, BGR, Y41B, " \
++ "Y42B, YVYU, Y444, v210, v216, NV12, SN12, ST12, NV21, SN21, GRAY8, GRAY16_BE, " \
++ "GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \
++ "IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, " \
++ "Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, " \
++ "A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, " \
++ "VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, " \
++ "I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, " \
++ "NV12_10LE32, NV16_10LE32, NV12_10LE40, Y210, Y410, VUYA, BGR10A2_LE, INVZ, STV0, STV1 }"
/**
* GST_VIDEO_CAPS_MAKE:
gint width, gint height);
void (*set_window_handle) (GstVideoOverlay *overlay, guintptr handle);
-
++#ifdef TIZEN_FEATURE_WAYLAND_ENHANCEMENT
+ void (*set_wl_window_wl_surface_id) (GstVideoOverlay * overlay, gint wl_surface_id);
+
+ void (*set_display_roi_area) (GstVideoOverlay *overlay,
+ gint x, gint y,
+ gint width, gint height);
+
+ void (*set_video_roi_area) (GstVideoOverlay *overlay,
+ gdouble x_scale, gdouble y_scale,
+ gdouble w_scale, gdouble h_scale);
++#endif
};
+ GST_VIDEO_API
GType gst_video_overlay_get_type (void);
/* virtual function wrappers */
void gst_video_overlay_got_window_handle (GstVideoOverlay * overlay,
guintptr handle);
+ GST_VIDEO_API
void gst_video_overlay_prepare_window_handle (GstVideoOverlay * overlay);
+ GST_VIDEO_API
gboolean gst_is_video_overlay_prepare_window_handle_message (GstMessage * msg);
-
+ GST_VIDEO_API
+ void gst_video_overlay_install_properties (GObjectClass * oclass,
+ gint last_prop_id);
+
+ GST_VIDEO_API
+ gboolean gst_video_overlay_set_property (GObject * object,
+ gint last_prop_id,
+ guint property_id,
+ const GValue * value);
++#ifdef TIZEN_FEATURE_WAYLAND_ENHANCEMENT
++GST_VIDEO_API
+void gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
+ gint wl_surface_id);
+
++GST_VIDEO_API
+gboolean gst_video_overlay_set_display_roi_area (GstVideoOverlay * overlay,
+ gint x, gint y,
+ gint width, gint height);
+
++GST_VIDEO_API
+gboolean gst_video_overlay_set_video_roi_area (GstVideoOverlay * overlay,
+ gdouble x_scale, gdouble y_scale,
+ gdouble w_scale, gdouble h_scale);
++#endif
G_END_DECLS
#endif /* __GST_VIDEO_OVERLAY_H__ */
group->dbin = dbin;
group->parent = parent;
- if(dbin->use_trustzone)
- {
+#ifdef TIZEN_FEATURE_TRUSTZONE
+ /*tzmultiqueue patch : when this flag is set to TRUE, we will use tzmultiqueue instead of multiqueue element in pipeline*/
++ if (dbin->use_trustzone) {
+ GST_DEBUG_OBJECT (dbin, "decodebin2 use tzmultiqueue");
+ mq = group->multiqueue = gst_element_factory_make ("tzmultiqueue", NULL);
+ }
+ else
+#endif
mq = group->multiqueue = gst_element_factory_make ("multiqueue", NULL);
if (G_UNLIKELY (!group->multiqueue))
goto missing_multiqueue;
"subpicture/x-dvd; " \
"subpicture/x-dvb; " \
"subpicture/x-xsub; " \
- "subpicture/x-pgs"
+ "subpicture/x-pgs; " \
+ "closedcaption/x-cea-608; " \
+ "closedcaption/x-cea-708"
+#else
+#define DEFAULT_RAW_CAPS \
+ "video/x-raw(ANY); " \
+ "audio/x-raw(ANY); " \
+ "text/x-raw(ANY); " \
+ "subpicture/x-dvd; " \
+ "subpicture/x-dvb; " \
+ "subpicture/x-xsub; " \
- "subpicture/x-pgs"
- #endif
++ "subpicture/x-pgs; " \
++ "closedcaption/x-cea-608; " \
++ "closedcaption/x-cea-708"
++#endif
G_END_DECLS
/* in either case, let's not simply discard this event;
* trigger sending of the saved requested seek segment
* or the one taken here from upstream */
-
- self->need_segment = TRUE; /* upstream */
+ self->need_segment = TRUE;
+
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ SUBPARSE_SEEK_UNLOCK (self);
+#endif
-
++
break;
}
case GST_EVENT_FLUSH_START:
return FALSE;
}
- #ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
++#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
static GstStaticCaps generic_xml_caps = GST_STATIC_CAPS ("application/xml");
#define GENERIC_XML_CAPS (gst_static_caps_get(&generic_xml_caps))
"mpegversion", G_TYPE_INT, mpegversion, NULL);
}
};
+#endif
+
/*** video/mpegts Transport Stream ***/
static GstStaticCaps mpegts_caps = GST_STATIC_CAPS ("video/mpegts, "
"systemstream = (boolean) true, packetsize = (int) [ 188, 208 ]");
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MJ2_CAPS);
}
}
-
+
+
+ static GstStaticCaps jpc_caps = GST_STATIC_CAPS ("image/x-jpc");
+
+ #define JPC_CAPS gst_static_caps_get(&jpc_caps)
+
+ static void
+ jpc_type_find (GstTypeFind * tf, gpointer unused)
+ {
+ gboolean found_cod = FALSE;
+ gboolean found_qcd = FALSE;
+ gboolean found_sot = FALSE;
+ const guint8 *data;
+ gint offset = 0;
+ const guint8 soc_siz[] = { 0xff, 0x4f, 0xff, 0x51 };
+
+ #define GST_TYPE_FIND_JPC_MARKER_SOT 0xFF90
+ #define GST_TYPE_FIND_JPC_MARKER_COD 0xFF52
+ #define GST_TYPE_FIND_JPC_MARKER_QCD 0xFF5C
+ #define GST_TYPE_FIND_JPC_MARKER_COC 0xFF53
+ #define GST_TYPE_FIND_JPC_MARKER_RGN 0xFF5E
+ #define GST_TYPE_FIND_JPC_MARKER_QCC 0xFF5D
+ #define GST_TYPE_FIND_JPC_MARKER_POC 0xFF5F
+ #define GST_TYPE_FIND_JPC_MARKER_PLM 0xFF57
+ #define GST_TYPE_FIND_JPC_MARKER_PPM 0xFF60
+ #define GST_TYPE_FIND_JPC_MARKER_TLM 0xFF55
+ #define GST_TYPE_FIND_JPC_MARKER_CRG 0xFF63
+ #define GST_TYPE_FIND_JPC_MARKER_COM 0xFF64
+ #define GST_TYPE_FIND_JPC_MARKER_CBD 0xFF78
+ #define GST_TYPE_FIND_JPC_MARKER_MCC 0xFF75
+ #define GST_TYPE_FIND_JPC_MARKER_MCT 0xFF74
+ #define GST_TYPE_FIND_JPC_MARKER_MCO 0xFF77
+
+
+ /* SOC marker + SIZ marker */
+ if ((data = gst_type_find_peek (tf, 0, 4)) != NULL) {
+ if (memcmp (data, soc_siz, 4) != 0)
+ return;
+ offset += 4;
+ } else {
+ return;
+ }
+
+ while (!found_sot) {
+
+ /* skip actual marker data */
+ if ((data = gst_type_find_peek (tf, offset, 2)) != NULL) {
+ offset += GST_READ_UINT16_BE (data);
+ } else {
+ return;
+ }
+
+ /* read marker */
+ if ((data = gst_type_find_peek (tf, offset, 2)) != NULL) {
+ guint16 marker = GST_READ_UINT16_BE (data);
+ switch (marker) {
+ case GST_TYPE_FIND_JPC_MARKER_SOT:
+ found_sot = TRUE;
+ break;
+ case GST_TYPE_FIND_JPC_MARKER_COD:
+ found_cod = TRUE;
+ break;
+ case GST_TYPE_FIND_JPC_MARKER_QCD:
+ found_qcd = TRUE;
+ break;
+ /* optional header markers */
+ case GST_TYPE_FIND_JPC_MARKER_COC:
+ case GST_TYPE_FIND_JPC_MARKER_RGN:
+ case GST_TYPE_FIND_JPC_MARKER_QCC:
+ case GST_TYPE_FIND_JPC_MARKER_POC:
+ case GST_TYPE_FIND_JPC_MARKER_PLM:
+ case GST_TYPE_FIND_JPC_MARKER_PPM:
+ case GST_TYPE_FIND_JPC_MARKER_TLM:
+ case GST_TYPE_FIND_JPC_MARKER_CRG:
+ case GST_TYPE_FIND_JPC_MARKER_COM:
+ case GST_TYPE_FIND_JPC_MARKER_CBD:
+ case GST_TYPE_FIND_JPC_MARKER_MCC:
+ case GST_TYPE_FIND_JPC_MARKER_MCT:
+ case GST_TYPE_FIND_JPC_MARKER_MCO:
+ break;
+ /* unrecognized marker */
+ default:
+ return;
+ }
+ offset += 2;
+ } else {
+ return;
+ }
+ }
+
+ if (found_cod && found_qcd && found_sot)
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, JPC_CAPS);
+ }
+#endif
+
/*** video/quicktime ***/
static GstStaticCaps qt_caps = GST_STATIC_CAPS ("video/quicktime");
}
}
}
+#endif
+
/*** image/x-exr ***/
static GstStaticCaps exr_caps = GST_STATIC_CAPS ("image/x-exr");
#define EXR_CAPS (gst_static_caps_get(&exr_caps))
"application/x-kate", NULL);
}
}
+#endif
+
/*** WEBVTTT subtitles ***/
static GstStaticCaps webvtt_caps =
GST_STATIC_CAPS ("application/x-subtitle-vtt, parsed=(boolean)false");
gst_type_find_suggest (tf, GST_TYPE_FIND_NEARLY_CERTAIN, AR_CAPS);
}
}
+#endif
+
/*** audio/x-au ***/
/* NOTE: we cannot replace this function with TYPE_FIND_REGISTER_START_WITH,
"application/x-yuv4mpeg", "y4mversion", G_TYPE_INT, 2, NULL);
}
}
+#endif
+
/*** DVD ISO images (looks like H.264, see #674069) ***/
static void
dvdiso_type_find (GstTypeFind * tf, gpointer private)
TYPE_FIND_REGISTER_START_WITH (plugin, "video/x-vcd", GST_RANK_PRIMARY,
"dat", "\000\377\377\377\377\377\377\377\377\377\377\000", 12,
GST_TYPE_FIND_MAXIMUM);
+#endif
TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-imelody", GST_RANK_PRIMARY,
"imy,ime,imelody", "BEGIN:IMELODY", 13, GST_TYPE_FIND_MAXIMUM);
+ TYPE_FIND_REGISTER_START_WITH (plugin, "application/x-scc", GST_RANK_PRIMARY,
+ "scc", "Scenarist_SCC V1.0", 18, GST_TYPE_FIND_MAXIMUM);
+ TYPE_FIND_REGISTER (plugin, "application/x-mcc", GST_RANK_PRIMARY,
+ mcc_type_find, "mcc", MCC_CAPS, NULL, NULL);
+
#if 0
TYPE_FIND_REGISTER_START_WITH (plugin, "video/x-smoke", GST_RANK_PRIMARY,
NULL, "\x80smoke\x00\x01\x00", 6, GST_TYPE_FIND_MAXIMUM);
TYPE_FIND_REGISTER_START_WITH (plugin, "application/x-pn-realaudio",
GST_RANK_SECONDARY, "ra,ram,rm,rmvb", ".ra\375", 4,
GST_TYPE_FIND_MAXIMUM);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
TYPE_FIND_REGISTER (plugin, "application/x-shockwave-flash",
GST_RANK_SECONDARY, swf_type_find, "swf,swfl", SWF_CAPS, NULL, NULL);
- #endif
++#endif
+ TYPE_FIND_REGISTER (plugin, "application/xges",
+ GST_RANK_PRIMARY, xges_type_find, "xges", XGES_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "application/dash+xml",
GST_RANK_PRIMARY, dash_mpd_type_find, "mpd,MPD", DASH_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "application/vnd.ms-sstr+xml",
TYPE_FIND_REGISTER (plugin, "audio/audible", GST_RANK_MARGINAL,
aa_type_find, "aa,aax", AA_CAPS, NULL, NULL);
-
++#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
+ TYPE_FIND_REGISTER (plugin, "audio/x-tap-tap", GST_RANK_PRIMARY,
+ tap_type_find, "tap", TAP_CAPS, NULL, NULL);
+ TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-tap-dmp",
+ GST_RANK_SECONDARY, "dmp", "DC2N-TAP-RAW", 12, GST_TYPE_FIND_LIKELY);
++#endif
return TRUE;
}
GstVideoPrimariesMode primaries_mode;
gdouble alpha_value;
gint n_threads;
++#ifdef USE_TBM
+ GstBufferPool *pool;
++#endif
};
struct _GstVideoConvertClass
--- /dev/null
- Version: 1.12.2
- Release: 6
+%bcond_with x
+%define gst_branch 1.0
+%define _lib_gstreamer_dir %{_libdir}/gstreamer-%{gst_branch}
+%define _libdebug_dir %{_libdir}/debug/usr/lib
+
+Name: gst-plugins-base
- %license COPYING.LIB
++Version: 1.16.2
++Release: 1
+License: LGPL-2.0+
+Summary: GStreamer Streaming-Media Framework Plug-Ins
+Url: http://gstreamer.freedesktop.org/
+Group: Multimedia/Framework
+Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.xz
+Source100: common.tar.gz
+BuildRequires: gettext-tools
+BuildRequires: pkgconfig(glib-2.0) >= 2.32
+BuildRequires: pkgconfig(gstreamer-1.0)
+BuildRequires: orc >= 0.4.16
+BuildRequires: python
+%if "%{tizen_profile_name}" != "tv"
+BuildRequires: update-desktop-files
+%endif
+BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.31.1
+BuildRequires: pkgconfig(alsa) >= 0.9.1
+BuildRequires: pkgconfig(freetype2) >= 2.0.9
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(ogg) >= 1.0
+BuildRequires: pkgconfig(theoradec) >= 1.1
+BuildRequires: pkgconfig(theoraenc) >= 1.1
+BuildRequires: pkgconfig(vorbis) >= 1.0
+BuildRequires: pkgconfig(vorbisenc) >= 1.0
+BuildRequires: pkgconfig(zlib)
+
+BuildRequires: pkgconfig(libdrm)
+BuildRequires: pkgconfig(libtbm)
+%if %{with x}
+BuildRequires: pkgconfig(ice)
+BuildRequires: pkgconfig(sm)
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(xv)
+BuildRequires: pkgconfig(xfixes)
+BuildRequires: pkgconfig(dri2proto)
+BuildRequires: pkgconfig(libdri2)
+%endif
+
+Requires: gstreamer >= 1.0.0
+Supplements: gstreamer
+Provides: %{name}-profile_tv = %{version}-%{release}
+Provides: %{name}-profile_common = %{version}-%{release}
+Provides: %{name}-profile_wearable = %{version}-%{release}
+Provides: %{name}-profile_ivi = %{version}-%{release}
+
+%description
+GStreamer is a streaming media framework based on graphs of filters
+that operate on media data. Applications using this library can do
+anything media-related, from real-time sound processing to playing
+videos. Its plug-in-based architecture means that new data types or
+processing capabilities can be added simply by installing new plug-ins.
+
+%package extension-adder
+Summary: libgstadder.so for gst-plugins-base
+Requires: %{name} = %{version}-%{release}
+Provides: %{name}-profile_mobile = %{version}-%{release}
+%description extension-adder
+Libgstadder.so for gst-plugin-base. Supplicant for gst-plugin-base.
+This is for Tizen mobile profile.
+
+%package devel
+Summary: Include files and Libraries
+Requires: %{name} = %{version}
+
+%description devel
+This package contains all necessary include files and libraries needed
+to compile and link applications that use gstreamer-plugins-base.
+
+%prep
+%setup -q -n gst-plugins-base-%{version}
+%setup -q -T -D -a 100
+
+%build
+# FIXME: GTKDOC_CFLAGS, GST_OBJ_CFLAGS:
+# Silently ignored compilation of uninstalled gtk-doc scanners without RPM_OPT_FLAGS.
+export V=1
+NOCONFIGURE=1 ./autogen.sh
+export CFLAGS="%{optflags} -fno-strict-aliasing\
+ -DTIZEN_FEATURE_WAYLAND_ENHANCEMENT\
+ -DTIZEN_FEATURE_TYPEFIND_ENHANCEMENT\
+ -DTIZEN_FEATURE_AUDIODECODER_MODIFICATION\
+ -DTIZEN_FEATURE_DISABLE_MIME_TYPES\
+ -DTIZEN_FEATURE_VIDEO_MODIFICATION\
+ -DTIZEN_FEATURE_SUBPARSE_MODIFICATION\
+ -DTIZEN_FEATURE_VOLUME_MODIFICATION\
+%if "%{tizen_profile_name}" == "tv"
+ -DTIZEN_PROFILE_TV\
+ -DTIZEN_FEATURE_TRUSTZONE\
+%endif
+ -fstack-protector-strong\
+ -Wl,-z,relro\
+ -D_FORTIFY_SOURCE=2\
+ "
+%configure\
+ --disable-static\
+ --enable-experimental\
+ --disable-gtk-doc\
+ --enable-introspection\
+ --disable-encoding\
+ --disable-examples\
+%if "%{tizen_profile_name}" == "tv"
+ --enable-tv\
+%endif
+ --enable-tbm
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+%make_install
+%find_lang %{name}-%{gst_branch}
+mv %{name}-%{gst_branch}.lang %{name}.lang
+rm -rf %{buildroot}%{_libdir}/girepository-%{gst_branch}/*.typelib
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%lang_package
+
+%files
+%manifest %{name}.manifest
+%defattr(-, root, root)
- %{_lib_gstreamer_dir}/libgstaudiorate.so
++%license COPYING
+
+%{_lib_gstreamer_dir}/libgstalsa.so
+%{_lib_gstreamer_dir}/libgstapp.so
+%{_lib_gstreamer_dir}/libgstaudioconvert.so
++%{_lib_gstreamer_dir}/libgstaudiomixer.so
++%{_lib_gstreamer_dir}/libgstaudiorate.so
+%{_lib_gstreamer_dir}/libgstaudioresample.so
+%{_lib_gstreamer_dir}/libgstaudiotestsrc.so
- %license COPYING.LIB
++%{_lib_gstreamer_dir}/libgstcompositor.so
+%{_lib_gstreamer_dir}/libgstgio.so
+%{_lib_gstreamer_dir}/libgstogg.so
+%{_lib_gstreamer_dir}/libgstplayback.so
++%{_lib_gstreamer_dir}/libgstoverlaycomposition.so
+%{_lib_gstreamer_dir}/libgstsubparse.so
+%{_lib_gstreamer_dir}/libgsttcp.so
+%{_lib_gstreamer_dir}/libgsttheora.so
+%{_lib_gstreamer_dir}/libgsttypefindfunctions.so
+%{_lib_gstreamer_dir}/libgstvideoconvert.so
+%{_lib_gstreamer_dir}/libgstvideorate.so
+%{_lib_gstreamer_dir}/libgstvideoscale.so
+%{_lib_gstreamer_dir}/libgstvideotestsrc.so
+%{_lib_gstreamer_dir}/libgstvolume.so
+%{_lib_gstreamer_dir}/libgstvorbis.so
+%{_lib_gstreamer_dir}/libgstpbtypes.so
+%{_lib_gstreamer_dir}/libgstrawparse.so
+
+%if %{with x}
+%{_lib_gstreamer_dir}/libgstximagesink.so
+%{_lib_gstreamer_dir}/libgstxvimagesink.so
+%endif
+
+%{_libdir}/libgstapp*.so.*
+%{_libdir}/libgstaudio*.so.*
+%{_libdir}/libgstallocators*.so.*
+%{_libdir}/libgstfft*.so.*
+%{_libdir}/libgstpbutils*.so.*
+%{_libdir}/libgstriff*.so.*
+%{_libdir}/libgstrtp*.so.*
+%{_libdir}/libgstrtsp*.so.*
+%{_libdir}/libgstsdp*.so.*
+%{_libdir}/libgsttag*.so.*
+%{_libdir}/libgstvideo*.so.*
+%dir %{_datadir}/gst-plugins-base/
+%dir %{_datadir}/gst-plugins-base/%{gst_branch}/
+%{_datadir}/gst-plugins-base/%{gst_branch}/license-translations.dict
+
+%files extension-adder
+%{_lib_gstreamer_dir}/libgstadder.so
++%license COPYING
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_includedir}/gstreamer-%{gst_branch}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+%{_datadir}/gir-1.0/*.gir
Name: GStreamer Video Library
Description: Video base classes and helper functions
Requires: gstreamer-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@
+ Requires.private: @ORC_PC@
Version: @VERSION@
Libs: -L${libdir} -lgstvideo-@GST_API_VERSION@
--Cflags: -I${includedir}
++Cflags: -I${includedir} -DTIZEN_FEATURE_WAYLAND_ENHANCEMENT