add query about adaptive information for DRC 19/67819/2
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 28 Apr 2016 10:53:24 +0000 (19:53 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 28 Apr 2016 10:54:16 +0000 (19:54 +0900)
Change-Id: I19642018fed016291a81b0ca1123da296dc3a007
Signed-off-by: Eunhae Choi <eunhae1.choi@samsung.com>
gst-libs/gst/adaptivedemux/gstadaptivedemux.c
packaging/gst-plugins-bad.spec

index bee190e..fff8b83 100644 (file)
@@ -1330,6 +1330,30 @@ gst_adaptive_demux_src_query (GstPad * pad, GstObject * parent,
       }
       GST_MANIFEST_UNLOCK (demux);
       break;
+#ifdef GST_ADAPTIVE_MODIFICATION
+      case GST_QUERY_CUSTOM:{
+        /* Let decoder(which can not support DRC automatically) know the current streaming mode */
+
+        const GstStructure *s;
+        s = gst_query_get_structure (query);
+
+        if (gst_structure_has_name (s, "GstAdaptiveStreaming")) {
+          GValue value = { 0, };
+          GST_DEBUG_OBJECT (demux, "custom query to check adaptive streaming");
+
+          g_value_init (&value, G_TYPE_BOOLEAN);
+          g_value_set_boolean (&value, TRUE);
+
+          gst_structure_set_value ((GstStructure *)s, "adaptive-streaming", &value);
+          ret = TRUE;
+        } else {
+          GST_DEBUG_OBJECT (demux, "Unsupported query");
+          ret = FALSE;
+        }
+        break;
+      }
+#endif
+
     default:
       /* Don't forward queries upstream because of the special nature of this
        *  "demuxer", which relies on the upstream element only to be fed
index 5badfe7..12538ff 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:           gst-plugins-bad
 Version:        1.6.1
-Release:        3
+Release:        4
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -79,7 +79,7 @@ processing capabilities can be added simply by installing new plug-ins.
 %build
 export V=1
 NOCONFIGURE=1 ./autogen.sh
-export CFLAGS="-DGST_WLSINK_ENHANCEMENT -DGST_TBM_SUPPORT -DMESA_EGL_NO_X11_HEADERS -DGST_EXT_AVOID_PAD_SWITCHING"
+export CFLAGS="-DGST_WLSINK_ENHANCEMENT -DGST_TBM_SUPPORT -DMESA_EGL_NO_X11_HEADERS -DGST_EXT_AVOID_PAD_SWITCHING -DGST_ADAPTIVE_MODIFICATION"
 %configure\
        --disable-static\
        --disable-examples\