From d4636091827f3178f2b7f336792d1ba1ddac4f8b Mon Sep 17 00:00:00 2001 From: hyades Date: Thu, 8 Aug 2013 02:43:01 +0530 Subject: [PATCH] Chnaged structure of testsource --- python-api/gstswitch/test_testsource.py | 5 ++++- python-api/gstswitch/testsource.py | 17 ++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/python-api/gstswitch/test_testsource.py b/python-api/gstswitch/test_testsource.py index 5253f5b..2a075fa 100644 --- a/python-api/gstswitch/test_testsource.py +++ b/python-api/gstswitch/test_testsource.py @@ -151,4 +151,7 @@ def test_normal(self): assert src.clockoverlay == test -# class TestVideoSrc \ No newline at end of file +class TestVideoSrcRun(object): + + def function(): + pass \ No newline at end of file diff --git a/python-api/gstswitch/testsource.py b/python-api/gstswitch/testsource.py index 042ff79..e2f8cf2 100644 --- a/python-api/gstswitch/testsource.py +++ b/python-api/gstswitch/testsource.py @@ -247,6 +247,14 @@ def __init__( self.pattern = self.generate_pattern(pattern) self.timeoverlay = timeoverlay self.clockoverlay = clockoverlay + self.pipeline = VideoPipeline( + self.port, + self.HOST, + self.width, + self.height, + self.pattern, + self.timeoverlay, + self.clockoverlay) @property def port(self): @@ -351,15 +359,6 @@ def clockoverlay(self, clockoverlay): def run(self): """Run the pipeline""" - self.pipeline = VideoPipeline( - self.port, - self.HOST, - self.width, - self.height, - self.pattern, - self.timeoverlay, - self.clockoverlay) - self.pipeline.play() def pause(self):