gstreamer_0.10.36.1: worked on mkv memory leak (not finaly fixed!.. but a little...
authorhschang <chang@dev3>
Sun, 3 Feb 2013 12:58:08 +0000 (21:58 +0900)
committerhschang <chang@dev3>
Tue, 5 Feb 2013 02:05:50 +0000 (11:05 +0900)
meta-openvuplus/recipes-multimedia/gstreamer/gstreamer-0.10.36.1+git/multiqueue-sparsestreams.patch [new file with mode: 0644]
meta-openvuplus/recipes-multimedia/gstreamer/gstreamer_0.10.36.1.bb

diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer-0.10.36.1+git/multiqueue-sparsestreams.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer-0.10.36.1+git/multiqueue-sparsestreams.patch
new file mode 100644 (file)
index 0000000..64968ff
--- /dev/null
@@ -0,0 +1,97 @@
+--- ./plugins/elements/gstmultiqueue.c-original        2013-01-08 14:40:09.002563354 +0100
++++ ./plugins/elements/gstmultiqueue.c 2013-01-08 14:39:45.578850244 +0100
+@@ -161,6 +161,7 @@
+   GstDataQueueSize max_size, extra_size;
+   GstClockTime cur_time;
+   gboolean is_eos;
++  gboolean is_sparse;
+   gboolean flushing;
+   /* Protected by global lock */
+@@ -801,6 +802,12 @@
+   return result;
+ }
++static gboolean
++is_sparse (GstSingleQueue * sq)
++{
++  return sq->is_sparse;
++}
++
+ static void
+ update_buffering (GstMultiQueue * mq, GstSingleQueue * sq)
+ {
+@@ -822,6 +829,8 @@
+   /* get bytes and time percentages and take the max */
+   if (sq->is_eos) {
+     percent = 100;
++  } else if (is_sparse (sq)) {
++    percent = 100;
+   } else {
+     percent = 0;
+     if (sq->max_size.time > 0) {
+@@ -1606,15 +1615,26 @@
+   GstSingleQueue *sq = gst_pad_get_element_private (pad);
+   GstPad *otherpad;
+   GstCaps *result;
+-
++  GstStructure* str;
++  const gchar *g_type;
++
+   otherpad = (pad == sq->srcpad) ? sq->sinkpad : sq->srcpad;
+-  GST_LOG_OBJECT (otherpad, "Getting caps from the peer of this pad");
+-
+   result = gst_pad_peer_get_caps (otherpad);
+   if (result == NULL)
+     result = gst_caps_new_any ();
++  str = gst_caps_get_structure(result, 0);
++  g_type = str ? gst_structure_get_name(str) : (const gchar*)"unknown";
++
++  GST_LOG_OBJECT (otherpad, "Got caps from the peer of this pad: %s", g_type);
++
++  if ( !g_strcmp0(g_type, "video/x-dvd-subpicture") || !g_strcmp0(g_type, "text/x-pango-markup") || !g_strcmp0(g_type, "text/plain") || !g_strcmp0(g_type, "subpicture/x-pgs") )
++  {
++    GST_INFO_OBJECT (otherpad, "subtitle stream discovered --> set is_sparse to true");
++    sq->is_sparse = TRUE;
++  }
++
+   return result;
+ }
+@@ -1841,7 +1861,7 @@
+     GST_LOG_OBJECT (mq, "Checking Queue %d", oq->id);
+-    if (gst_data_queue_is_empty (oq->queue)) {
++    if (gst_data_queue_is_empty (oq->queue) && !is_sparse (oq)) {
+       GST_LOG_OBJECT (mq, "Queue %d is empty", oq->id);
+       if (IS_FILLED (sq, visible, size.visible)) {
+         sq->max_size.visible = size.visible + 1;
+@@ -1868,7 +1888,7 @@
+      *    we are checking here.
+      */
+     if (sq->is_eos || IS_FILLED (sq, bytes, ssize.bytes) ||
+-        IS_FILLED (sq, time, sq->cur_time)) {
++        IS_FILLED (sq, time, sq->cur_time) || is_sparse (oq)) {
+       GST_LOG_OBJECT (mq, "Queue %d is filled", oq->id);
+       filled = TRUE;
+     }
+@@ -1911,7 +1931,7 @@
+         gst_data_queue_limits_changed (oq->queue);
+       }
+     }
+-    if (!gst_data_queue_is_empty (oq->queue))
++    if (!gst_data_queue_is_empty (oq->queue) || is_sparse (oq))
+       empty = FALSE;
+   }
+   GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
+@@ -2011,6 +2031,7 @@
+       (GstDataQueueFullCallback) single_queue_overrun_cb,
+       (GstDataQueueEmptyCallback) single_queue_underrun_cb, sq);
+   sq->is_eos = FALSE;
++  sq->is_sparse = FALSE;
+   sq->flushing = FALSE;
+   gst_segment_init (&sq->sink_segment, GST_FORMAT_TIME);
+   gst_segment_init (&sq->src_segment, GST_FORMAT_TIME);
index fd0e36c..b25ee9a 100644 (file)
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
                     file://gst/gst.h;beginline=1;endline=21;md5=8e5fe5e87d33a04479fde862e238eaa4"
 DEPENDS = "glib-2.0 libxml2 bison-native flex-native"
 
-PR = "r0"
+PR = "r1"
 GIT_PV = ""
 
 SRCREV = "935db833e236959c973e6c8ef59586d30f81a26c"
@@ -31,6 +31,7 @@ SRC_URI = "git://anongit.freedesktop.org/gstreamer/${PN}"
 SRC_URI += " \
        file://check_fix.patch \
        file://gst-inspect-check-error.patch \
+       file://multiqueue-sparsestreams.patch \
 "
 
 do_common_update() {