Hello
I was trying to write a python function who check the type from a field in a Caps structure. >From the python binding I use the function : has_field_typed My first param is a field name , and the second the type. Is on chossing the type where I have a problem. if field type is |G_TYPE_INT , I use : has_field_typed("width",gobject.TYPE_INT). The result is fine. if field type is ||GST_TYPE_INT_RANGE or ||GST_TYPE_FRACTION, I don't know what is the second parameter value for ||has_field_typed()||. I did not find any gst.TYPE_INT_RANGE constant. What value I can use for that or where it is defined ? I was trying to play with gst.IntRange(), but without success. Thanks in advance Nico. || | ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Administrator
|
On Tue, 2008-10-14 at 23:42 +0200, nico wrote:
> Hello > I was trying to write a python function who check the type from a field > in a Caps structure. > >From the python binding I use the function : has_field_typed > My first param is a field name , and the second the type. > > Is on chossing the type where I have a problem. > if field type is |G_TYPE_INT , I use : > has_field_typed("width",gobject.TYPE_INT). The result is fine. > > if field type is ||GST_TYPE_INT_RANGE or ||GST_TYPE_FRACTION, I don't > know what is the second parameter value for ||has_field_typed()||. I did > not find any gst.TYPE_INT_RANGE constant. What value I can use for that > or where it is defined ? I was trying to play with gst.IntRange(), but > without success. > Those GType are not available (even though the classes corresponding to those types (gst.IntRange, gst.Fraction)) are. You can achieve a similar result by doing: s = pad.get_caps()[0] if "width" in s and isinstance(s["width"], gst.IntRange): print "We have an IntRange 'width' property" Edward > Thanks in advance11 > > Nico. > > > || > > | > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel Edward Hervey <[hidden email]> BilboEd ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
> > You can achieve a similar result by doing: > > s = pad.get_caps()[0] > if "width" in s and isinstance(s["width"], gst.IntRange): > print "We have an IntRange 'width' property" > > > Thanks for the tip ! Nico ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |