Added .dia UML of GstCaps
authorWim Taymans <wim.taymans@gmail.com>
Sun, 11 Feb 2001 18:29:55 +0000 (18:29 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sun, 11 Feb 2001 18:29:55 +0000 (18:29 +0000)
Original commit message from CVS:
Added .dia UML of GstCaps
Added the autoplugger factory to plugins.dia
Added a first draft for caps-negotiation

docs/random/caps.dia [new file with mode: 0644]
docs/random/plugins.dia
docs/random/wtay/caps-negociation [new file with mode: 0644]

diff --git a/docs/random/caps.dia b/docs/random/caps.dia
new file mode 100644 (file)
index 0000000..2f160e2
--- /dev/null
@@ -0,0 +1,1132 @@
+<?xml version="1.0"?>
+<diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <diagramdata>
+    <attribute name="background">
+      <color val="#ffffff"/>
+    </attribute>
+    <attribute name="paper">
+      <composite type="paper">
+        <attribute name="name">
+          <string>#A4#</string>
+        </attribute>
+        <attribute name="tmargin">
+          <real val="2.82"/>
+        </attribute>
+        <attribute name="bmargin">
+          <real val="2.82"/>
+        </attribute>
+        <attribute name="lmargin">
+          <real val="2.82"/>
+        </attribute>
+        <attribute name="rmargin">
+          <real val="2.82"/>
+        </attribute>
+        <attribute name="is_portrait">
+          <boolean val="true"/>
+        </attribute>
+        <attribute name="scaling">
+          <real val="1"/>
+        </attribute>
+        <attribute name="fitto">
+          <boolean val="false"/>
+        </attribute>
+      </composite>
+    </attribute>
+    <attribute name="grid">
+      <composite type="grid">
+        <attribute name="width_x">
+          <real val="1"/>
+        </attribute>
+        <attribute name="width_y">
+          <real val="1"/>
+        </attribute>
+        <attribute name="visible_x">
+          <int val="1"/>
+        </attribute>
+        <attribute name="visible_y">
+          <int val="1"/>
+        </attribute>
+      </composite>
+    </attribute>
+    <attribute name="guides">
+      <composite type="guides">
+        <attribute name="hguides"/>
+        <attribute name="vguides"/>
+      </composite>
+    </attribute>
+  </diagramdata>
+  <layer name="Background" visible="true">
+    <object type="UML - Class" version="0" id="O0">
+      <attribute name="obj_pos">
+        <point val="1.65,5.6"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="1.6,5.55;13.6504,9.65"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="1.65,5.6"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="11.9504"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="4"/>
+      </attribute>
+      <attribute name="name">
+        <string>#GstCaps#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#name#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#gchar *#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#id#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#guint16#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#properties#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#GstProps *#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Class" version="0" id="O1">
+      <attribute name="obj_pos">
+        <point val="16.35,9.65"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="16.3,9.6;26.896,12.1"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="16.35,9.65"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="10.496"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="2.4"/>
+      </attribute>
+      <attribute name="name">
+        <string>#GstProps#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#properties#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#GList *#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Association" version="0" id="O2">
+      <attribute name="obj_pos">
+        <point val="13.6004,9.1"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="12.1504,7.65;17.8,11.8"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="13.6004,9.1"/>
+        <point val="15.15,9.1"/>
+        <point val="15.15,10.35"/>
+        <point val="16.35,10.35"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="0"/>
+        <enum val="1"/>
+        <enum val="0"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string>#0#</string>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="2"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string>#1#</string>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O0" connection="13"/>
+        <connection handle="1" to="O1" connection="3"/>
+      </connections>
+    </object>
+    <object type="UML - Class" version="0" id="O3">
+      <attribute name="obj_pos">
+        <point val="14.75,13.45"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="14.7,13.4;26.2656,16.7"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="14.75,13.45"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="11.4656"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="3.2"/>
+      </attribute>
+      <attribute name="name">
+        <string>#GstPropsEntry#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#propid#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#GQuark#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#propstype#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#GstPropsId#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Association" version="0" id="O4">
+      <attribute name="obj_pos">
+        <point val="16.35,11.55"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="11.25,10.1;17.8,15.6"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="16.35,11.55"/>
+        <point val="12.7,11.55"/>
+        <point val="12.7,14.15"/>
+        <point val="14.75,14.15"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="0"/>
+        <enum val="1"/>
+        <enum val="0"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string>#0#</string>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="2"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string>#*#</string>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O1" connection="8"/>
+        <connection handle="1" to="O3" connection="3"/>
+      </connections>
+    </object>
+    <object type="UML - Class" version="0" id="O5">
+      <attribute name="obj_pos">
+        <point val="4.45,19.05"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="4.4,19;14.996,21.5"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="4.45,19.05"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="10.496"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="2.4"/>
+      </attribute>
+      <attribute name="name">
+        <string>#boolean#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#bool_data#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#gboolean#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Class" version="0" id="O6">
+      <attribute name="obj_pos">
+        <point val="10.55,22.4"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="10.5,22.35;21.5808,24.85"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="10.55,22.4"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="10.9808"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="2.4"/>
+      </attribute>
+      <attribute name="name">
+        <string>#fourcc#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#fourcc_data#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#guint32#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Class" version="0" id="O7">
+      <attribute name="obj_pos">
+        <point val="16.8,19.2"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="16.75,19.15;24.922,21.65"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="16.8,19.2"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="8.072"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="2.4"/>
+      </attribute>
+      <attribute name="name">
+        <string>#int#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#int_data#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#gint#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Class" version="0" id="O8">
+      <attribute name="obj_pos">
+        <point val="22.5,22.55"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="22.45,22.5;31.5916,25"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="22.5,22.55"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="9.0416"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="2.4"/>
+      </attribute>
+      <attribute name="name">
+        <string>#list#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#entries#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#GList *#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Class" version="0" id="O9">
+      <attribute name="obj_pos">
+        <point val="27.9,18.85"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="27.85,18.8;33.598,22.1"/>
+      </attribute>
+      <attribute name="elem_corner">
+        <point val="27.9,18.85"/>
+      </attribute>
+      <attribute name="elem_width">
+        <real val="5.648"/>
+      </attribute>
+      <attribute name="elem_height">
+        <real val="3.2"/>
+      </attribute>
+      <attribute name="name">
+        <string>#int_range#</string>
+      </attribute>
+      <attribute name="stereotype">
+        <string/>
+      </attribute>
+      <attribute name="abstract">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_attributes">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="suppress_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="visible_attributes">
+        <boolean val="true"/>
+      </attribute>
+      <attribute name="visible_operations">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="attributes">
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#min#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#gint#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+        <composite type="umlattribute">
+          <attribute name="name">
+            <string>#max#</string>
+          </attribute>
+          <attribute name="type">
+            <string>#gint#</string>
+          </attribute>
+          <attribute name="value">
+            <string/>
+          </attribute>
+          <attribute name="visibility">
+            <enum val="0"/>
+          </attribute>
+          <attribute name="abstract">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="class_scope">
+            <boolean val="false"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <attribute name="operations"/>
+      <attribute name="template">
+        <boolean val="false"/>
+      </attribute>
+      <attribute name="templates"/>
+    </object>
+    <object type="UML - Association" version="0" id="O10">
+      <attribute name="obj_pos">
+        <point val="30.724,18.85"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="19.0328,15.2;32.174,20.45"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="30.724,18.85"/>
+        <point val="30.724,18.25"/>
+        <point val="20.4828,18.25"/>
+        <point val="20.4828,16.65"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="1"/>
+        <enum val="0"/>
+        <enum val="1"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="1"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O9" connection="1"/>
+        <connection handle="1" to="O3" connection="6"/>
+      </connections>
+    </object>
+    <object type="UML - Association" version="0" id="O11">
+      <attribute name="obj_pos">
+        <point val="20.836,19.2"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="19.0328,15.2;22.286,20.8"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="20.836,19.2"/>
+        <point val="20.836,18.25"/>
+        <point val="20.4828,18.25"/>
+        <point val="20.4828,16.65"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="1"/>
+        <enum val="0"/>
+        <enum val="1"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="1"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O7" connection="1"/>
+        <connection handle="1" to="O3" connection="6"/>
+      </connections>
+    </object>
+    <object type="UML - Association" version="0" id="O12">
+      <attribute name="obj_pos">
+        <point val="9.698,19.05"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="8.248,15.2;21.9328,20.65"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="9.698,19.05"/>
+        <point val="9.698,18.25"/>
+        <point val="20.4828,18.25"/>
+        <point val="20.4828,16.65"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="1"/>
+        <enum val="0"/>
+        <enum val="1"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="1"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O5" connection="1"/>
+        <connection handle="1" to="O3" connection="6"/>
+      </connections>
+    </object>
+    <object type="UML - Association" version="0" id="O13">
+      <attribute name="obj_pos">
+        <point val="16.0404,22.4"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="14.5904,15.2;21.9328,24"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="16.0404,22.4"/>
+        <point val="16.0404,18.25"/>
+        <point val="20.4828,18.25"/>
+        <point val="20.4828,16.65"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="1"/>
+        <enum val="0"/>
+        <enum val="1"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="1"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O6" connection="1"/>
+        <connection handle="1" to="O3" connection="6"/>
+      </connections>
+    </object>
+    <object type="UML - Association" version="0" id="O14">
+      <attribute name="obj_pos">
+        <point val="27.0208,22.55"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="19.0328,15.2;28.4708,24.15"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="27.0208,22.55"/>
+        <point val="27.0208,18.25"/>
+        <point val="20.4828,18.25"/>
+        <point val="20.4828,16.65"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="1"/>
+        <enum val="0"/>
+        <enum val="1"/>
+      </attribute>
+      <attribute name="name">
+        <string>#union#</string>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string/>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="1"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O8" connection="1"/>
+        <connection handle="1" to="O3" connection="6"/>
+      </connections>
+    </object>
+    <object type="UML - Association" version="0" id="O15">
+      <attribute name="obj_pos">
+        <point val="31.5416,24.45"/>
+      </attribute>
+      <attribute name="obj_bb">
+        <rectangle val="24.7656,12.7;36.3,25.9"/>
+      </attribute>
+      <attribute name="orth_points">
+        <point val="31.5416,24.45"/>
+        <point val="34.85,24.45"/>
+        <point val="34.85,14.15"/>
+        <point val="26.2156,14.15"/>
+      </attribute>
+      <attribute name="orth_orient">
+        <enum val="0"/>
+        <enum val="1"/>
+        <enum val="0"/>
+      </attribute>
+      <attribute name="name">
+        <string/>
+      </attribute>
+      <attribute name="direction">
+        <enum val="0"/>
+      </attribute>
+      <attribute name="ends">
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string>#1#</string>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="2"/>
+          </attribute>
+        </composite>
+        <composite>
+          <attribute name="role">
+            <string/>
+          </attribute>
+          <attribute name="multiplicity">
+            <string>#*#</string>
+          </attribute>
+          <attribute name="arrow">
+            <boolean val="false"/>
+          </attribute>
+          <attribute name="aggregate">
+            <enum val="0"/>
+          </attribute>
+        </composite>
+      </attribute>
+      <connections>
+        <connection handle="0" to="O8" connection="9"/>
+        <connection handle="1" to="O3" connection="4"/>
+      </connections>
+    </object>
+  </layer>
+</diagram>
index de76551..e7c4206 100644 (file)
Binary files a/docs/random/plugins.dia and b/docs/random/plugins.dia differ
diff --git a/docs/random/wtay/caps-negociation b/docs/random/wtay/caps-negociation
new file mode 100644 (file)
index 0000000..a445f30
--- /dev/null
@@ -0,0 +1,248 @@
+caps negotiation
+================
+
+1) purpose
+----------
+
+The pads expose the media types they can handle using a mime
+type and a set of properties. Before the pad is created or
+used to pass buffers, we only know the global 'range' of media
+data this pad can accept. When the element has had a chance to
+look at the media data, only then it knows the exact values of the 
+properties.
+
+example1:
+!
+! The mp3 decoder exposes the capabilities of its src pad
+! with the following caps:
+!
+!     'mpg123_src':
+!       MIME type: 'audio/raw':
+!       format: Integer: 16
+!       depth: Integer: 16
+!       rate: Integer range: 11025 - 48000
+!       channels: Integer range: 1 - 2
+
+as you can see in example1, the padtemplate has both a range
+(for the audio rate) and a list (for the number of channels)
+for its properties.
+
+only when the mpg123 element has decoded the first mpeg audio
+header, it knows the exact values of the rate and channels
+properties.
+
+suppose that we want to connect this src pad to the sink pad
+of an audiosink with the properties given in example2:
+
+example2:
+!
+!     'audiosink_sink':
+!       MIME type: 'audio/raw':
+!       format: Integer: 16
+!       depth: List:
+!         Integer: 8
+!         Integer: 16
+!       rate: Integer range: 8000 - 44000
+!       channels: Integer range: 1 - 2
+
+we can see that connecting the mpg123 src pad with the
+audiosinks sink pad can cause a potential problem with the
+rate property.
+
+When the mpg123 decoder decides to output raw audio with a
+48000Hz samplerate, the audiosink will not be able to handle
+it. The conservative approach would be to disallow the connection
+between the two incompatible pads. This rules out any potential
+problems but severely limits the amount of possible connections
+between the elements. 
+
+Another approach would be to allow the connection (and mark it
+as dangerous) and let the two elements figure out a suitable
+media type at runtime. This procedure is called caps negotiation.
+
+
+2) a bit of history
+-------------------
+
+The typing of the data that was attached to a buffer used to be
+done using GstMeta* (and it still is as of 11 feb 2001). With
+the new GstCaps and GstProps system this typing is gradually moved
+to the pads and to the padtemplates. This has several advantages:
+
+  - the typing of the data tends to be static. The type of media
+    doesn't change for every buffer.
+
+  - Moving the typing up to the pad(templates) allows us to save
+    them into the registry and allows us to figure out what pads
+    are compatible.
+
+  - the current metadata implementation needs header files. this may
+    change when we also use properties for metadata.
+
+example3:
+!
+! This is the current GstMeta structure that travels with audio buffers
+!
+!  struct _MetaAudioRaw {
+!    GstMeta meta;
+!
+!    /* formatting information */
+!    gint format;
+!    gint channels;
+!    gint frequency;
+!    gint bps;
+!  };
+           
+
+The question still remains what purpose the metadata will serve
+now that we expose the media type in the pads. Some possibilities:
+
+  - interesting information, not describing the data itself but the
+    context in which the data was generated (suggested buffer size,
+    timestamps, etc...)
+
+  - user app metadata. 
+
+In this proposal we also assume that the current use of metadata using
+GstMeta is deprecated and that we move this information to the properties
+of the pads.
+
+
+3) the pad/padtemplates caps
+----------------------------
+
+All elements have to provide a padtemplate for their pads.
+
+The padtemplates provide a range of possible media types this pad can
+src/sink. the main purpose for the padtemplates is to allow a
+rough guess at which pads are compatible before even a single buffer
+has been processed by the element.
+
+pads are usually created from the templates. When the pad is created
+it has no GstCaps* attached to it yet. The possible caps this pad
+can have is exposed in the padtemplate.
+
+
+4) the connect function
+-----------------------
+
+when two pads are connected the following steps will take
+place: 
+
+ - if both pads have caps, the caps are checked. If the caps
+   are incompatible, the padtemplates are checked, if they
+   are compatible, caps negotiation is performed.
+
+ - if one of the pads has caps, the caps is checked against
+   the padtemplate of the peer pad. If they are incompatible,
+   the padtemplates are compared, if they are incompatible,
+   caps negotiation is performed.
+   
+ - if none of the pads have caps, the padtemplates are checked, 
+   if they are incompatible, a warning is issued.
+   
+
+5) when the element knows the media type it is handling
+-------------------------------------------------------
+
+When the element has received its first buffer it will know
+the media type it is handling by inspecting the buffer.
+
+before pushing the data out to its peer element(s), the element
+will set its src pad with the appropriate caps and properties.
+These caps must follow the following rules:
+
+  - the caps must be compatible with the padtemplates of this 
+    pad.
+
+  - the caps cannot contain ranges or lists.
+
+by setting the caps of the src pad, the following procedure
+happens:
+
+  - if the peer pad has a negotiate function, it is called and
+    negotiation is performed (see later)
+
+  - if the peer pad has no negotiate function, the padtemplate
+    is checked:
+
+    - if the caps are compatible with the template, the peer pad
+      receives the same caps as the src pad.
+
+    - if the caps are not compatible, the negotiation fails and
+      the elements are disconnected. A signal is emitted to inform
+      the user app or the manager of the element to find a solution.
+the caps can be set with the gst_pad_set_caps function, which accepts
+the following parameters:
+
+   - the pad to set the caps to
+   - whether the peer pad *must* accept the caps (AUTHORITATIVE) or
+     whether if can reject the caps (TRY)
+   - a GstCaps* structure
+
+example4:
+!
+!  an audio element setting its src pad caps (need something easier):
+!
+!     gst_pad_set_caps (
+!       pad,
+!       GST_CAPS_NEGOTIATE_AUTHORITATIVE,
+!       gst_caps_new_with_props (
+!         "src_caps",                       /* name */
+!         "audio/raw",                      /* mime */
+!         gst_props_new (
+!           "format",   GST_PROPS_INT (AFMT_S16_LE),
+!           "depth",    GST_PROPS_INT (16),
+!           "rate",     GST_PROPS_INT (44100),
+!           "channels", GST_PROPS_INT (2),
+!           NULL
+!         )
+!       )
+!     );
+
+the _set_caps function returns a gboolean, indicating that the
+new caps are accepted by the peer pad.
+
+when the negotiation type is set to TRY, and the negotiation 
+fails, the pad has to perform another _set_caps call. The last 
+call to _set_caps has to be of type AUTHORITATIVE.
+
+when the negotiation fails and the type is set to AUTHORITATIVE,
+the pads are disconnected and a signal is emitted to inform any
+interested listeners.
+
+
+6) caps negotiation
+-------------------
+
+the negotiate function of a pad is called whenever the peer pad 
+modifies the caps using the gst_pad_set_caps function.
+
+The negotiate function has to return a gboolean indicating the 
+new caps are acceptable. When it accepts the caps, both pads will
+be set to the negotiated caps.
+
+example5:
+! this is the caps negotiation function implemented by an element on
+! one of its sink pads.
+!
+!  static gboolean
+!  gst_pad_caps_negotiate (GstPad *pad, GstCaps *caps)
+!  {
+!    /* we don't accept anything else than audio/raw */
+!    if (strcmp (gst_caps_get_mime (caps), "audio/raw"))
+!      return FALSE;
+!
+!    if (gst_caps_get_int_prop (caps, "format") != AFMT_S16_LE)
+!      return FALSE;
+!      
+!    /* we accept everything else */
+!    return TRUE;
+!  }
+
+
+
+
+
+