--- /dev/null
-upstream_branch = upstream/1.6
+ [general]
++upstream_branch = upstream/1.12
+ upstream_tag = ${upstreamversion}
pkgconfig \
gst-libs \
gst sys $(SUBDIRS_EXT) \
- tools \
- tests \
+ tests \
- docs \
po \
common \
m4
$(top_builddir)/tests/check/elements/gdpdepay \
$(top_builddir)/tests/check/pipelines/streamheader \
$(top_builddir)/tests/examples/audio/testchannels \
- $(top_builddir)/tests/examples/volume/volume \
- $(top_builddir)/tools/gst-discoverer
+ $(top_builddir)/tests/examples/volume/volume
CRUFT_DIRS = \
+ $(top_srcdir)/docs/design \
$(top_srcdir)/docs/plugins/tmpl \
$(top_srcdir)/ext/gio \
$(top_srcdir)/gst/gdp \
+++ /dev/null
--version.entities
+++ /dev/null
--audio-enumtypes.c
--audio-enumtypes.h
--gstaudiopack.h
+++ /dev/null
--pbutils-enumtypes.c
--pbutils-enumtypes.h
--pbutils-marshal.c
--pbutils-marshal.h
GList *pending_events;
};
-/* Require at least 8kB of data before we attempt typefind.
+/* Require at least 8kB of data before we attempt typefind.
* Seems a decent value based on test files
- * 40kB is massive overkill for the maximum, I think, but it
+ * 40kB is massive overkill for the maximum, I think, but it
* doesn't do any harm (tpm: increased to 64kB after watching
* typefinding fail on a wavpack file that needed 42kB to succeed) */
+ #ifdef TIZEN_PROFILE_TV
+ #define TYPE_FIND_MIN_SIZE 2048
+ #else
#define TYPE_FIND_MIN_SIZE 8192
+ #endif
+
#define TYPE_FIND_MAX_SIZE 65536
#define DEFAULT_PULL_BLOCKSIZE 4096
+++ /dev/null
--video-enumtypes.c
--video-enumtypes.h
--video-orc.h
case GST_VIDEO_FORMAT_A422_10LE:
case GST_VIDEO_FORMAT_A444_10BE:
case GST_VIDEO_FORMAT_A444_10LE:
- case GST_VIDEO_FORMAT_ST12:
+ case GST_VIDEO_FORMAT_P010_10BE:
+ case GST_VIDEO_FORMAT_P010_10LE:
+ case GST_VIDEO_FORMAT_SN12:
++ case GST_VIDEO_FORMAT_ST12:
res = format;
g_assert_not_reached ();
break;
PSTR2222, PLANE0123, OFFS0, SUB4444, PACK_A444_10LE),
MAKE_YUV_FORMAT (NV61, "raw video", GST_MAKE_FOURCC ('N', 'V', '6', '1'),
DPTH888, PSTR122, PLANE011, OFFS010, SUB422, PACK_NV61),
-#endif
+ MAKE_YUV_FORMAT (P010_10BE, "raw video", 0x00000000, DPTH10_10_10_HI,
+ PSTR244, PLANE011, OFFS001, SUB420, PACK_P010_10BE),
+ MAKE_YUV_LE_FORMAT (P010_10LE, "raw video", 0x00000000, DPTH10_10_10_HI,
+ PSTR244, PLANE011, OFFS001, SUB420, PACK_P010_10LE),
+ MAKE_YUV_FORMAT (IYU2, "raw video", GST_MAKE_FOURCC ('I', 'Y', 'U', '2'),
+ DPTH888, PSTR333, PLANE0, OFFS102, SUB444, PACK_IYU2),
+ MAKE_YUV_FORMAT (VYUY, "raw video", GST_MAKE_FOURCC ('V', 'Y', 'U', 'Y'),
+ DPTH888, PSTR244, PLANE0, OFFS102, SUB422, PACK_VYUY),
+ MAKE_RGBA_FORMAT (GBRA, "raw video", DPTH8888, PSTR1111, PLANE2013,
+ OFFS0, SUB4444, PACK_GBRA),
+ MAKE_RGBA_FORMAT (GBRA_10BE, "raw video", DPTH10_10_10_10, PSTR222, PLANE2013,
+ OFFS0, SUB4444, PACK_GBRA_10BE),
+ MAKE_RGBA_LE_FORMAT (GBRA_10LE, "raw video", DPTH10_10_10_10, PSTR222,
+ PLANE2013,
+ OFFS0, SUB4444, PACK_GBRA_10LE),
+ MAKE_RGB_FORMAT (GBR_12BE, "raw video", DPTH12_12_12, PSTR222, PLANE201,
+ OFFS0, SUB444, PACK_GBR_12BE),
+ MAKE_RGB_LE_FORMAT (GBR_12LE, "raw video", DPTH12_12_12, PSTR222, PLANE201,
+ OFFS0, SUB444, PACK_GBR_12LE),
+ MAKE_RGBA_FORMAT (GBRA_12BE, "raw video", DPTH12_12_12_12, PSTR222, PLANE2013,
+ OFFS0, SUB4444, PACK_GBRA_12BE),
+ MAKE_RGBA_LE_PACK_FORMAT (GBRA_12LE, "raw video", DPTH12_12_12_12, PSTR222,
+ PLANE2013, OFFS0, SUB4444, PACK_GBRA_12LE),
+ MAKE_YUV_FORMAT (I420_12BE, "raw video", 0x00000000, DPTH12_12_12,
+ PSTR222, PLANE012, OFFS0, SUB420, PACK_I420_12BE),
+ MAKE_YUV_LE_FORMAT (I420_12LE, "raw video", 0x00000000, DPTH12_12_12,
+ PSTR222, PLANE012, OFFS0, SUB420, PACK_I420_12LE),
+ MAKE_YUV_FORMAT (I422_12BE, "raw video", 0x00000000, DPTH12_12_12,
+ PSTR222, PLANE012, OFFS0, SUB422, PACK_I422_12BE),
+ MAKE_YUV_LE_FORMAT (I422_12LE, "raw video", 0x00000000, DPTH12_12_12,
+ PSTR222, PLANE012, OFFS0, SUB422, PACK_I422_12LE),
+ MAKE_YUV_FORMAT (Y444_12BE, "raw video", 0x00000000, DPTH12_12_12,
+ 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),
+ #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_AYUV;
case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
GST_VIDEO_FORMAT_A444_10BE,
GST_VIDEO_FORMAT_A444_10LE,
GST_VIDEO_FORMAT_NV61,
- GST_VIDEO_FORMAT_STV1, /* TIZEN_PROFILE_TV */
+ GST_VIDEO_FORMAT_P010_10BE,
+ GST_VIDEO_FORMAT_P010_10LE,
+ GST_VIDEO_FORMAT_IYU2,
+ GST_VIDEO_FORMAT_VYUY,
+ GST_VIDEO_FORMAT_GBRA,
+ GST_VIDEO_FORMAT_GBRA_10BE,
+ GST_VIDEO_FORMAT_GBRA_10LE,
+ GST_VIDEO_FORMAT_GBR_12BE,
+ GST_VIDEO_FORMAT_GBR_12LE,
+ GST_VIDEO_FORMAT_GBRA_12BE,
+ GST_VIDEO_FORMAT_GBRA_12LE,
+ GST_VIDEO_FORMAT_I420_12BE,
+ GST_VIDEO_FORMAT_I420_12LE,
+ GST_VIDEO_FORMAT_I422_12BE,
+ GST_VIDEO_FORMAT_I422_12LE,
+ GST_VIDEO_FORMAT_Y444_12BE,
+ GST_VIDEO_FORMAT_Y444_12LE,
+ 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, YV12, YUY2, UYVY, AYUV, RGBx, " \
+ #define GST_VIDEO_FORMATS_ALL "{ I420, S420, YV12, YUY2, UYVY, AYUV, RGBx, " \
- "BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, " \
- "YVYU, Y444, v210, v216, NV12, SN12, ST12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, " \
- "GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \
- "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, " \
- " Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, "\
- " A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }"
+ "BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, " \
- "Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, " \
++ "Y444, v210, v216, NV12, SN12, ST12, 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, " \
+ "GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, " \
+ "Y444_12BE, Y444_12LE }"
/**
* GST_VIDEO_CAPS_MAKE:
info->offset[2] = info->offset[1] * 2;
info->size = info->stride[0] * height * 3;
break;
+ case GST_VIDEO_FORMAT_GBRA:
+ info->stride[0] = GST_ROUND_UP_4 (width);
+ info->stride[1] = info->stride[0];
+ info->stride[2] = info->stride[0];
+ info->stride[3] = info->stride[0];
+ info->offset[0] = 0;
+ info->offset[1] = info->stride[0] * height;
+ info->offset[2] = info->offset[1] * 2;
+ info->offset[3] = info->offset[1] * 3;
+ info->size = info->stride[0] * height * 4;
+ break;
case GST_VIDEO_FORMAT_NV12:
+ #ifdef TIZEN_FEATURE_VIDEO_MODIFICATION
+ case GST_VIDEO_FORMAT_SN12:
+ case GST_VIDEO_FORMAT_ST12:
+ case GST_VIDEO_FORMAT_SN21:
+ #endif
case GST_VIDEO_FORMAT_NV21:
info->stride[0] = GST_ROUND_UP_4 (width);
info->stride[1] = info->stride[0];
case GST_VIDEO_FORMAT_ENCODED:
break;
case GST_VIDEO_FORMAT_UNKNOWN:
+ #ifdef TIZEN_FEATURE_VIDEO_MODIFICATION
+ default:
+ #endif
GST_ERROR ("invalid format");
g_warning ("invalid format");
+ return FALSE;
break;
}
- return 0;
+ return TRUE;
}
/**
+++ /dev/null
--Makefile
--Makefile.in
--*.o
--*.lo
--*.la
--.deps
--.libs
+++ /dev/null
--channelmixtest
#define DEFAULT_RAW_CAPS \
"video/x-raw(ANY); " \
"audio/x-raw(ANY); " \
- "text/x-raw; " \
+ "text/x-raw(ANY); " \
+ "text/x-pango-markup; " \
+ "text/plain; " \
"subpicture/x-dvd; " \
"subpicture/x-dvb; " \
+ "subpicture/x-xsub; " \
"subpicture/x-pgs"
- "text/x-raw; " \
+ #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
G_END_DECLS
sink = _get_video_pad (renderer);
if (G_UNLIKELY (!sink)) {
+ if (video_caps)
+ gst_caps_unref (video_caps);
GST_WARNING_OBJECT (self, "Can't get video sink from renderer");
+ if (video_caps)
+ gst_caps_unref (video_caps);
return FALSE;
}
allowed_caps = gst_pad_query_caps (sink, NULL);
GST_DEBUG_CATEGORY (sub_parse_debug);
#define DEFAULT_ENCODING NULL
+#define ATTRIBUTE_REGEX "\\s?[a-zA-Z0-9\\. \t\\(\\)]*"
+static const gchar *allowed_srt_tags[] = { "i", "b", "u", NULL };
+static const gchar *allowed_vtt_tags[] =
+ { "i", "b", "c", "u", "v", "ruby", "rt", NULL };
+ #ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ #define DEFAULT_CURRENT_LANGUAGE NULL
+ #endif
enum
{
PROP_0,
/* Set segment on our parser state machine */
self->state.segment = &self->segment;
/* Now parse the line, out of segment lines will just return NULL */
- GST_LOG_OBJECT (self, "Parsing line '%s'", line + offset);
+ GST_LOG_OBJECT (self, "State %d. Parsing line '%s'", self->state.state,
+ line + offset);
subtitle = self->parse_line (&self->state, line + offset);
g_free (line);
-
+ #ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ if (!self->state.langlist_msg_posted && self->state.language_list) {
+ m = gst_message_new_element (GST_OBJECT_CAST (self), gst_structure_new("Ext_Sub_Language_List",
+ "lang_list", G_TYPE_POINTER, self->state.language_list, NULL));
+
+ gst_element_post_message (GST_ELEMENT_CAST (self), m);
+ self->state.langlist_msg_posted = TRUE;
+ GST_DEBUG_OBJECT (self, "curr lang as : %s ", GST_STR_NULL(self->state.current_language));
+ }
+ #endif
if (subtitle) {
guint subtitle_len = strlen (subtitle);
gpointer user_data;
gboolean have_internal_fps; /* If TRUE don't overwrite fps by property */
gint fps_n, fps_d; /* used by frame based parsers */
-#endif
+ guint8 line_position; /* percent value */
+ gint line_number; /* line number, can be positive or negative */
+ guint8 text_position; /* percent value */
+ guint8 text_size; /* percent value */
+ gchar *vertical; /* "", "vertical", "vertical-lr" */
+ gchar *alignment; /* "", "start", "middle", "end" */
+ gconstpointer allowed_tags; /* list of markup tags allowed in the cue text. */
+ gboolean allows_tag_attributes;
+ #ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ GList* language_list;
+ gchar* current_language;
+ gboolean langlist_msg_posted;
++#endif
} ParserState;
typedef gchar* (*Parser) (ParserState *state, const gchar *line);
+++ /dev/null
--gsttcp-enumtypes.c
--gsttcp-enumtypes.h
--gsttcp-marshal.c
--gsttcp-marshal.h
--fdsetstress
return;
}
- gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, URI_CAPS);
+ gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY, URI_CAPS);
}
}
+ #endif
+
+/*** application/itc ***/
+static GstStaticCaps itc_caps = GST_STATIC_CAPS ("application/itc");
+#define ITC_CAPS (gst_static_caps_get(&itc_caps))
+
+static void
+itc_type_find (GstTypeFind * tf, gpointer unused)
+{
+ DataScanCtx c = { 0, NULL, 0 };
+ guint8 magic[8] = { 0x00, 0x00, 0x01, 0x1C, 0x69, 0x74, 0x63, 0x68 };
+ guint8 preamble[4] = { 0x00, 0x00, 0x00, 0x02 };
+ guint8 artwork_marker[8] = { 0x00, 0x00, 0x00, 0x00, 0x61, 0x72, 0x74, 0x77 };
+ guint8 item_marker[4] = { 0x69, 0x74, 0x65, 0x6D };
+ GstTypeFindProbability itc_prob = GST_TYPE_FIND_NONE;
+ int i;
+
+ if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 8)))
+ return;
+
+ if (memcmp (c.data, magic, 8))
+ return;
+
+ /* At least we found the right magic */
+ itc_prob = GST_TYPE_FIND_MINIMUM;
+ data_scan_ctx_advance (tf, &c, 8);
+
+ if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 12)))
+ goto done;
+
+ /* Check preamble 3 consecutive times */
+ for (i = 0; i < 3; i++) {
+ if (memcmp (c.data, preamble, 4))
+ goto done;
+ data_scan_ctx_advance (tf, &c, 4);
+ }
+
+ itc_prob = GST_TYPE_FIND_POSSIBLE;
+
+ if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 8)))
+ goto done;
+
+ if (memcmp (c.data, artwork_marker, 8))
+ goto done;
+
+ itc_prob = GST_TYPE_FIND_LIKELY;
+ data_scan_ctx_advance (tf, &c, 8);
+
+ if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 256)))
+ goto done;
+
+ /* ...and 256 0x00 padding bytes on what looks like the header's end */
+ for (i = 0; i < 256; i++) {
+ if (c.data[i])
+ goto done;
+ }
+
+ itc_prob = GST_TYPE_FIND_NEARLY_CERTAIN;
+ data_scan_ctx_advance (tf, &c, 256);
+
+ if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 8)))
+ goto done;
+
+ if (memcmp (c.data + 4, item_marker, 4))
+ goto done;
+
+ itc_prob = GST_TYPE_FIND_MAXIMUM;
+
+done:
+ gst_type_find_suggest (tf, itc_prob, ITC_CAPS);
+}
+
/*** application/x-hls ***/
static GstStaticCaps hls_caps = GST_STATIC_CAPS ("application/x-hls");
"application/x-kate", NULL);
}
}
-
++#endif
+/*** WEBVTTT subtitles ***/
+static GstStaticCaps webvtt_caps =
+GST_STATIC_CAPS ("application/x-subtitle-vtt, parsed=(boolean)false");
+#define WEBVTT_CAPS (gst_static_caps_get(&webvtt_caps))
+
+static void
+webvtt_type_find (GstTypeFind * tf, gpointer private)
+{
+ const guint8 *data;
+
+ data = gst_type_find_peek (tf, 0, 9);
+
+ if (data == NULL)
+ return;
+
+ /* there might be a UTF-8 BOM at the beginning */
+ if (memcmp (data, "WEBVTT", 6) != 0 && memcmp (data + 3, "WEBVTT", 6) != 0) {
+ return;
+ }
+
+ if (data[0] != 'W') {
+ if (data[0] != 0xef || data[1] != 0xbb || data[2] != 0xbf)
+ return; /* Not a UTF-8 BOM */
+ data += 3;
+ }
+
+ /* After the WEBVTT magic must be one of these chars:
+ * 0x20 (space), 0x9 (tab), 0xa (LF) or 0xd (CR) */
+ if (data[6] != 0x20 && data[6] != 0x9 && data[6] != 0xa && data[6] != 0xd) {
+ return;
+ }
+
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, WEBVTT_CAPS);
+}
++#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
/*** application/x-ogm-video or audio***/
static GstStaticCaps ogmvideo_caps =
"txt", UTF16_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "text/utf-32", GST_RANK_MARGINAL, utf32_type_find,
"txt", UTF32_CAPS, NULL, NULL);
+ #ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
TYPE_FIND_REGISTER (plugin, "text/uri-list", GST_RANK_MARGINAL, uri_type_find,
"ram", URI_CAPS, NULL, NULL);
+ #endif
+ TYPE_FIND_REGISTER (plugin, "application/itc", GST_RANK_SECONDARY,
+ itc_type_find, "itc", ITC_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "application/x-hls", GST_RANK_MARGINAL,
hls_type_find, "m3u8", HLS_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "application/sdp", GST_RANK_SECONDARY,
GST_RANK_SECONDARY, "Z", "\037\235", 2, GST_TYPE_FIND_LIKELY);
TYPE_FIND_REGISTER (plugin, "subtitle/x-kate", GST_RANK_MARGINAL,
kate_type_find, NULL, NULL, NULL, NULL);
-#endif
++#endif
+ TYPE_FIND_REGISTER (plugin, "application/x-subtitle-vtt", GST_RANK_MARGINAL,
+ webvtt_type_find, "vtt", WEBVTT_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "audio/x-flac", GST_RANK_PRIMARY, flac_type_find,
"flac", FLAC_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "audio/x-vorbis", GST_RANK_PRIMARY,
libgstvideoconvert_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
noinst_HEADERS = gstvideoconvert.h
-
+
+ if BOARD_USE_TBM_BUF
+ libgstvideoconvert_la_SOURCES += gsttbmbufferpool.c
+ libgstvideoconvert_la_CFLAGS += -DUSE_TBM_BUFFER $(MMCOMMON_CFLAGS) $(TBM_CFLAGS)
+ libgstvideoconvert_la_LIBADD += $(TBM_LIBS) $(MM_COMMON_LIBS)
+ libgstvideoconvert_la_LDFLAGS += $(TBM_LDFLAGS) $(MM_COMMON_LDFLAGS)
+ noinst_HEADERS += gsttbmbufferpool.h
+ endif
return GST_FLOW_OK;
}
- size = sizeof(MMVideoBuffer);
- gst_query_parse_allocation (query, &caps, NULL);
+ #ifdef USE_TBM_BUFFER
+
+ static gboolean
+ gst_video_convert_decide_allocation (GstBaseTransform * trans,
+ GstQuery * query)
+ {
+
+ GstVideoConvert *vc = NULL;
+ GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
+ vc = GST_VIDEO_CONVERT_CAST(trans);
+
+ if(filter->out_info.finfo->format == GST_VIDEO_FORMAT_SN12 ) {
+
+ guint size = 0;
+ guint min = 0;
+ guint max = 0;
+ GstStructure *config;
+ GstCaps *caps = NULL;
+ #if 0
+ if (gst_query_get_n_allocation_pools (query) > 0) {
+ gst_query_parse_nth_allocation_pool (query, 0, &vc->tbm_buffer_pool, &size, &min, &max);
+
+ /* adjust size */
+ size = MAX (size, sizeof(MMVideoBuffer));
+
+ } else {
+ vc->tbm_buffer_pool = NULL;
+ min = max = 0;
+ }
+ #endif
++ size = sizeof(MMVideoBuffer);
++ if(vc->tbm_buffer_pool == NULL) {
++ min = 2;
++ max = 5;
++ GST_DEBUG("[%s]CREATING VIDEO_BUFFER_POOL",__FUNCTION__);
++ vc->tbm_buffer_pool = gst_mm_buffer_pool_new(trans);
++ }
++ config = gst_buffer_pool_get_config (vc->tbm_buffer_pool);
+
+ if (caps) {
+ vc->tbm_buffer_pool = gst_mm_buffer_pool_new(GST_ELEMENT_CAST(trans));
+ GST_DEBUG("[%s]CREATING VIDEO_BUFFER_POOL",__FUNCTION__);
+ }
+
+ if (caps) {
+ config = gst_buffer_pool_get_config (vc->tbm_buffer_pool);
+
+ min = 8;
+ max = 13;
+
+ gst_buffer_pool_config_set_params (config, caps, size, min, max);
+
+ if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) {
+ gst_buffer_pool_config_add_option (config,
+ GST_BUFFER_POOL_OPTION_VIDEO_META);
+ }
+
+ if (!gst_buffer_pool_set_config (vc->tbm_buffer_pool, config)) {
+ GST_INFO ("Failed to set config on internal pool");
+ gst_object_unref (vc->tbm_buffer_pool);
+ vc->tbm_buffer_pool = NULL;
+ return FALSE;
+ }
+
+ gst_query_add_allocation_pool (query, vc->tbm_buffer_pool, size, min, max);
+
+ if (!gst_buffer_pool_set_active(vc->tbm_buffer_pool,TRUE)) {
+ gst_object_unref (vc->tbm_buffer_pool);
+ vc->tbm_buffer_pool = NULL;
+ GST_INFO ("Failed to activate internal pool");
+ }
+
+ GST_DEBUG("[%s]BUFFER_POOL max:[%d], min:[%d]",__FUNCTION__, max, min);
+ } else {
+ GST_DEBUG("Not using our internal pool and copying buffers for downstream");
+ return FALSE;
+ }
+ }
+ return GST_BASE_TRANSFORM_CLASS (parent_class)->decide_allocation (trans, query);
+ }
+
+ static GstFlowReturn
+ gst_video_convert_prepare_output_buffer (GstBaseTransform * trans,
+ GstBuffer *input, GstBuffer **outbuf)
+ {
+ GstVideoConvert *vc = NULL;
+ GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
+
+ vc = GST_VIDEO_CONVERT_CAST(trans);
+
+ if(filter->out_info.finfo->format == GST_VIDEO_FORMAT_SN12 ) {
+ if(gst_buffer_pool_acquire_buffer(vc->tbm_buffer_pool,outbuf,0) != GST_FLOW_OK) {
+ GST_ERROR("[%s] memory prepare failed.",__FUNCTION__);
+ return GST_FLOW_ERROR;
+ }
+ return GST_FLOW_OK;
+ } else
+ return GST_BASE_TRANSFORM_CLASS (parent_class)->prepare_output_buffer(trans, input, outbuf);
+ }
+ #endif
+
static gboolean
plugin_init (GstPlugin * plugin)
{
GstVideoGammaMode gamma_mode;
GstVideoPrimariesMode primaries_mode;
gdouble alpha_value;
- GstBufferPool *tbm_buffer_pool;
+ gint n_threads;
++ GstBufferPool *tbm_buffer_pool;
};
struct _GstVideoConvertClass
+++ /dev/null
--Makefile
--Makefile.in
--*.o
--*.lo
--*.la
--.deps
--.libs
+++ /dev/null
--generate_sine_table
+++ /dev/null
--codeset.m4
--gettext.m4
--glibc21.m4
--iconv.m4
--intdiv0.m4
--inttypes-pri.m4
--inttypes.m4
--inttypes_h.m4
--isc-posix.m4
--lcmessage.m4
--lib-ld.m4
--lib-link.m4
--lib-prefix.m4
--progtest.m4
--stdint_h.m4
--uintmax_t.m4
--ulonglong.m4
--- /dev/null
-Version: 1.6.1
-Release: 13
+ %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
- -DTIZEN_FEATURE_GST_UPSTREAM\
++Version: 1.12.2
++Release: 0
+ 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_PRODUCT_TV}" != "1"
+ 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)
+ BuildRequires: pkgconfig(mm-common)
+ %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\
-%define _lib_gstreamer_dir %{_libdir}/gstreamer-%{gst_branch}
-%define _libdebug_dir %{_libdir}/debug/usr/lib
-
+ %if "%{TIZEN_PRODUCT_TV}" == "1"
+ -DTIZEN_PROFILE_TV\
+ -DTIZEN_FEATURE_TRUSTZONE\
+ %endif
+ "
+ %configure\
+ --disable-static\
+ --enable-experimental\
+ --disable-gtk-doc\
+ --enable-introspection\
+ --disable-encoding\
+ --disable-examples\
+ %if "%{TIZEN_PRODUCT_TV}" == "1"
+ --enable-tv\
+ %endif
+ --enable-use-tbmbuf
+ 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)
+ %license COPYING.LIB
+
-%{_libdir}/gstreamer-%{gst_branch}/libgstximagesink.so
-%{_libdir}/gstreamer-%{gst_branch}/libgstxvimagesink.so
+ %{_lib_gstreamer_dir}/libgstalsa.so
+ %{_lib_gstreamer_dir}/libgstapp.so
+ %{_lib_gstreamer_dir}/libgstaudioconvert.so
+ %{_lib_gstreamer_dir}/libgstaudioresample.so
+ %{_lib_gstreamer_dir}/libgstaudiotestsrc.so
+ %{_lib_gstreamer_dir}/libgstaudiorate.so
+ %{_lib_gstreamer_dir}/libgstgio.so
+ %{_lib_gstreamer_dir}/libgstogg.so
+ %{_lib_gstreamer_dir}/libgstplayback.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.LIB
+
+ %files devel
+ %manifest %{name}.manifest
+ %defattr(-, root, root)
+ %{_includedir}/gstreamer-%{gst_branch}/*
+ %{_libdir}/*.so
+ %{_libdir}/pkgconfig/*.pc
+ %{_datadir}/gir-1.0/*.gir
+++ /dev/null
--gst-device-monitor-?.0
--gst-discoverer-?.0
--gst-play-?.0