Merge the tizen patch and fix build err based on 1.12.2
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 2 Nov 2017 02:08:21 +0000 (11:08 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 2 Nov 2017 02:08:21 +0000 (11:08 +0900)
Change-Id: Iee49a16950dd3caf7f2a5185d9d20989296abf8e

42 files changed:
1  2 
.gbs.conf
Makefile.am
configure.ac
docs/.gitignore
gst-libs/gst/app/gstappsink.h
gst-libs/gst/audio/.gitignore
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/pbutils/.gitignore
gst-libs/gst/tag/gsttagdemux.c
gst-libs/gst/video/.gitignore
gst-libs/gst/video/Makefile.am
gst-libs/gst/video/gstvideodecoder.c
gst-libs/gst/video/video-converter.c
gst-libs/gst/video/video-format.c
gst-libs/gst/video/video-format.h
gst-libs/gst/video/video-info.c
gst-libs/gst/video/videooverlay.c
gst/adder/.gitignore
gst/audioconvert/.gitignore
gst/playback/.gitignore
gst/playback/gstdecodebin2.c
gst/playback/gstplaybackutils.c
gst/playback/gstrawcaps.h
gst/playback/gstsubtitleoverlay.c
gst/subparse/gstsubparse.c
gst/subparse/gstsubparse.h
gst/subparse/samiparse.c
gst/tcp/.gitignore
gst/typefind/gsttypefindfunctions.c
gst/videoconvert/Makefile.am
gst/videoconvert/gstvideoconvert.c
gst/videoconvert/gstvideoconvert.h
gst/videoscale/.gitignore
gst/videoscale/gstvideoscale.c
gst/videotestsrc/.gitignore
gst/volume/.gitignore
gst/volume/gstvolume.c
m4/.gitignore
packaging/common.tar.gz
packaging/gst-plugins-base.spec
pkgconfig/.gitignore
tools/.gitignore

diff --cc .gbs.conf
index 0000000,7302e56..3033b86
mode 000000,100644..100644
--- /dev/null
+++ b/.gbs.conf
@@@ -1,0 -1,3 +1,3 @@@
 -upstream_branch = upstream/1.6
+ [general]
++upstream_branch = upstream/1.12
+ upstream_tag = ${upstreamversion}
diff --cc Makefile.am
@@@ -10,9 -10,7 +10,7 @@@ SUBDIRS =                     
        pkgconfig               \
        gst-libs                \
        gst sys $(SUBDIRS_EXT)  \
-       tools                   \
 -      tests \
 +      tests                   \
-       docs                    \
        po                      \
        common                  \
        m4
@@@ -86,11 -81,9 +82,10 @@@ CRUFT_FILES = 
        $(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 \
diff --cc configure.ac
Simple merge
diff --cc docs/.gitignore
index e5a7abe,e5a7abe..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,1 -1,1 +1,0 @@@
--version.entities
diff --cc gst-libs/gst/audio/.gitignore
index 9e8783a,9e8783a..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,3 -1,3 +1,0 @@@
--audio-enumtypes.c
--audio-enumtypes.h
--gstaudiopack.h
Simple merge
diff --cc gst-libs/gst/pbutils/.gitignore
index 71267e4,71267e4..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,4 -1,4 +1,0 @@@
--pbutils-enumtypes.c
--pbutils-enumtypes.h
--pbutils-marshal.c
--pbutils-marshal.h
@@@ -108,12 -120,17 +108,17 @@@ struct _GstTagDemuxPrivat
    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
diff --cc gst-libs/gst/video/.gitignore
index 36b511d,36b511d..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,3 -1,3 +1,0 @@@
--video-enumtypes.c
--video-enumtypes.h
--video-orc.h
Simple merge
Simple merge
@@@ -5878,8 -4033,8 +5935,10 @@@ get_scale_format (GstVideoFormat format
      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;
@@@ -4821,41 -3586,12 +4833,47 @@@ static const VideoFormat formats[] = 
        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
@@@ -5042,8 -3786,8 +5068,10 @@@ gst_video_format_from_fourcc (guint32 f
        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'):
@@@ -175,23 -164,8 +181,25 @@@ typedef enum 
    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
@@@ -524,16 -489,13 +532,16 @@@ gconstpointer  gst_video_format_get_pal
  # 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:
@@@ -822,18 -725,12 +828,23 @@@ fill_planes (GstVideoInfo * info
        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;
  }
  
  /**
Simple merge
diff --cc gst/adder/.gitignore
index 08f5ed3,08f5ed3..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,7 -1,7 +1,0 @@@
--Makefile
--Makefile.in
--*.o
--*.lo
--*.la
--.deps
--.libs
diff --cc gst/audioconvert/.gitignore
index 696560c,696560c..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,1 -1,1 +1,0 @@@
--channelmixtest
diff --cc gst/playback/.gitignore
index e69de29,e69de29..0000000
deleted file mode 100644,100644
+++ /dev/null
Simple merge
Simple merge
@@@ -28,11 -29,21 +29,23 @@@ G_BEGIN_DECL
  #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
  
@@@ -931,9 -912,9 +931,11 @@@ _link_renderer (GstSubtitleOverlay * se
  
      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,
@@@ -1762,11 -1590,19 +1811,20 @@@ handle_buffer (GstSubParse * self, GstB
      /* 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);
  
@@@ -70,14 -69,11 +70,19 @@@ typedef struct 
    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);
Simple merge
diff --cc gst/tcp/.gitignore
index 45ededd,45ededd..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,5 -1,5 +1,0 @@@
--gsttcp-enumtypes.c
--gsttcp-enumtypes.h
--gsttcp-marshal.c
--gsttcp-marshal.h
--fdsetstress
@@@ -418,80 -419,10 +419,81 @@@ uri_type_find (GstTypeFind * tf, gpoint
        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");
@@@ -4685,42 -4615,7 +4699,43 @@@ kate_type_find (GstTypeFind * tf, gpoin
          "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 =
@@@ -5754,10 -5661,10 +5783,12 @@@ plugin_init (GstPlugin * plugin
        "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,
@@@ -14,3 -14,12 +14,11 @@@ libgstvideoconvert_la_LDFLAGS = $(GST_P
  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
@@@ -710,6 -726,101 +742,107 @@@ gst_video_convert_transform_frame (GstV
    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)
  {
@@@ -56,7 -56,7 +56,8 @@@ struct _GstVideoConvert 
    GstVideoGammaMode gamma_mode;
    GstVideoPrimariesMode primaries_mode;
    gdouble alpha_value;
 -  GstBufferPool *tbm_buffer_pool;
 +  gint n_threads;
++  GstBufferPool *tbm_buffer_pool;  
  };
  
  struct _GstVideoConvertClass
diff --cc gst/videoscale/.gitignore
index 08f5ed3,08f5ed3..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,7 -1,7 +1,0 @@@
--Makefile
--Makefile.in
--*.o
--*.lo
--*.la
--.deps
--.libs
Simple merge
diff --cc gst/videotestsrc/.gitignore
index 24c1bf2,24c1bf2..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,1 -1,1 +1,0 @@@
--generate_sine_table
diff --cc gst/volume/.gitignore
index 1549b67,1549b67..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,1 -1,1 +1,0 @@@
--demo
Simple merge
diff --cc m4/.gitignore
index ae2f6d8,ae2f6d8..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,17 -1,17 +1,0 @@@
--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
index 0000000,389600a..c3aef17
mode 000000,100644..100644
Binary files differ
index 0000000,5409802..8fc2f01
mode 000000,100755..100644
--- /dev/null
@@@ -1,0 -1,184 +1,182 @@@
 -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
diff --cc pkgconfig/.gitignore
index 6fd0ef0,6fd0ef0..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,1 -1,1 +1,0 @@@
--*.pc
diff --cc tools/.gitignore
index 2a374d3,2a374d3..0000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,3 -1,3 +1,0 @@@
--gst-device-monitor-?.0
--gst-discoverer-?.0
--gst-play-?.0