mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-02 14:36:41 +00:00
17 lines
563 B
Python
17 lines
563 B
Python
|
from common import gst, unittest
|
||
|
|
||
|
class PadTest(unittest.TestCase):
|
||
|
def setUp(self):
|
||
|
self.pipeline = gst.parse_launch('fakesrc name=source ! fakesink')
|
||
|
src = self.pipeline.get_by_name('source')
|
||
|
self.sink = src.get_pad('src')
|
||
|
|
||
|
def testQuery(self):
|
||
|
assert self.sink.query(gst.QUERY_TOTAL, gst.FORMAT_BYTES) == -1
|
||
|
assert self.sink.query(gst.QUERY_POSITION, gst.FORMAT_BYTES) == 0
|
||
|
assert self.sink.query(gst.QUERY_POSITION, gst.FORMAT_TIME) == 0
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
unittest.main()
|
||
|
|