Improbe XPath syntax to be more robust against changes in signal order
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 28 May 2009 08:43:08 +0000 (10:43 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 28 May 2009 08:43:08 +0000 (10:43 +0200)
gstreamer-sharp/baseplugins/decodebin.metadata
gstreamer-sharp/coreplugins/typefind.metadata

index ce1c238..05cce23 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <metadata>
-  <attr path="/element/element-signals/signal[1]/params/type[1]" name="name">Pad</attr>
-  <attr path="/element/element-signals/signal[1]/params/type[2]" name="name">Last</attr>
-  <attr path="/element/element-signals/signal[2]/params/type[1]" name="name">Pad</attr>
-  <attr path="/element/element-signals/signal[3]/params/type[1]" name="name">Pad</attr>
-  <attr path="/element/element-signals/signal[3]/params/type[2]" name="name">Caps</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='new-decoded-pad']/../params/type[1]" name="name">Pad</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='new-decoded-pad']/../params/type[2]" name="name">Last</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='removed-decoded-pad']/../params/type[1]" name="name">Pad</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='unknown-type']/../params/type[1]" name="name">Pad</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='unknown-type']/../params/type[2]" name="name">Caps</attr>
 </metadata>
index e476688..0482aa4 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
 <metadata>
-  <attr path="/element/element-signals/signal[1]/params/type[1]" name="name">Probability</attr>
-  <attr path="/element/element-signals/signal[1]/params/type[2]" name="name">Caps</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='have-type']/../params/type[1]" name="name">Probability</attr>
+  <attr path="/element/element-signals/signal/name[child::text()='have-type']/../params/type[2]" name="name">Caps</attr>
 </metadata>