Skip to content

Instantly share code, notes, and snippets.

@lubosz
Created March 23, 2014 14:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lubosz/9723758 to your computer and use it in GitHub Desktop.
Gst.Fraction cannot be set as a Gst.Structure value in Gst.Caps in python3
#!/usr/bin/python3
from gi.repository import Gst
Gst.init(None)
caps = Gst.Caps('video/x-raw,width=720,height=576,framerate=25/1')
caps.set_value("width", 123)
# Fails with RuntimeError: PyObject conversion to GValue failed
caps.set_value("framerate", Gst.Fraction(1/1))
# Fails in overrides
caps[0]["framerate"] = Gst.Fraction(1/1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment