mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
c0d4251e20
Original commit message from CVS: * testsuite/interface.py (Availability.testXOverlay): Extend to test method calling on interfaces * testsuite/common.py: call pygtk.require first * gst/gstbin.override (_wrap_gst_bin_get_by_name): Add a keyword argument recurse and remove _wrap_gst_bin_get_by_name_recurse_up. * gst/gst.override (_wrap_gst_element_get_pad_list): Split out bin functions to ... * gst/gstbin.override: .. this file * gst/gst.defs (bin_new): allow NULL for first argument. (child_state_change): Remove, it's private.
28 lines
817 B
Python
28 lines
817 B
Python
from common import gst, unittest
|
|
|
|
try:
|
|
from gst import interfaces
|
|
except:
|
|
raise SystemExit
|
|
|
|
import gobject
|
|
|
|
class Availability(unittest.TestCase):
|
|
def testXOverlay(self):
|
|
assert hasattr(interfaces, 'XOverlay')
|
|
assert issubclass(interfaces.XOverlay, gobject.GInterface)
|
|
|
|
def testMixer(self):
|
|
assert hasattr(interfaces, 'Mixer')
|
|
assert issubclass(interfaces.Mixer, gobject.GInterface)
|
|
|
|
if getattr(gobject, 'pygtk_version', ()) >= (2,3,92):
|
|
class FunctionCall(unittest.TestCase):
|
|
def testXOverlay(self):
|
|
element = gst.Element('xvimagesink')
|
|
assert isinstance(element, gst.Element)
|
|
assert isinstance(element, interfaces.XOverlay)
|
|
element.set_xwindow_id(0L)
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|