Skip to content

Commit

Permalink
removed unneccesarry commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Jul 11, 2013
1 parent 14e871a commit aa50ca6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 100 deletions.
40 changes: 20 additions & 20 deletions python-api/gstswitch/connection.py
Expand Up @@ -137,24 +137,24 @@ def click_video(self, x, y, fw, fh):
None)
return result

# def mark_face(self, faces):
# """mark_face(in a(iiii) faces);
# """
# args = GLib.Variant('a(iiii)', faces)
# connection = self.get_connection()
# result = connection.call_sync(
# self.name, self.object_path, 'info.duzy.gst.switch.SwitchControllerInterface', 'set_encode_mode',
# args, GLib.VariantType.new("(b)"), Gio.DBusCallFlags.NONE, -1,
# None)
# return result
def mark_face(self, faces):
"""mark_face(in a(iiii) faces);
"""
args = GLib.Variant('a(iiii)', faces)
connection = self.get_connection()
result = connection.call_sync(
self.name, self.object_path, 'info.duzy.gst.switch.SwitchControllerInterface', 'set_encode_mode',
args, GLib.VariantType.new("(b)"), Gio.DBusCallFlags.NONE, -1,
None)
return result

# def mark_tracking(self, faces):
# """mark_tracking(in a(iiii) faces);
# """
# args = GLib.Variant('a(iiii)', faces)
# connection = self.get_connection()
# result = connection.call_sync(
# self.name, self.object_path, 'info.duzy.gst.switch.SwitchControllerInterface', 'set_encode_mode',
# args, GLib.VariantType.new("(b)"), Gio.DBusCallFlags.NONE, -1,
# None)
# return result
def mark_tracking(self, faces):
"""mark_tracking(in a(iiii) faces);
"""
args = GLib.Variant('a(iiii)', faces)
connection = self.get_connection()
result = connection.call_sync(
self.name, self.object_path, 'info.duzy.gst.switch.SwitchControllerInterface', 'set_encode_mode',
args, GLib.VariantType.new("(b)"), Gio.DBusCallFlags.NONE, -1,
None)
return result
80 changes: 0 additions & 80 deletions python-api/gstswitch/gstswitch.py
Expand Up @@ -65,83 +65,3 @@ def connect_controller(self, Controller=None):
"""
pass



# class TestVideoSrc(object):
# """docstring for TestVideoSrc"""


# def __init__(self, port, width=300, height=200, pattern=None, timeoverlay=False, clockoverlay=False):
# super(TestVideoSrc, self).__init__()
# """Contructor for TestVideoSrc class
# Returns:
# None
# Parameters:
# videotestsrc pattern(optional): chooses random if not specified
# #some other optional
# """

# if timeoverlay:
# self.TIMEOVERLAY = True
# else:
# self.TIMEOVERLAY = False
# if clockoverlay:
# self.CLOCKOVERLAY = True
# else:
# self.CLOCKOVERLAY = False
# self.WIDTH = width
# self.HEIGHT = height
# self.port = port
# self.pattern = self.get_pattern(pattern)

# self.proc = None
# self.proc = self.run()
# if self.proc == None:
# pass
# def run(self):
# """Launches a Test Source

# """
# if self.TIMEOVERLAY == True:
# timeoverlay = """timeoverlay font-desc="Verdana bold 50" ! """
# else:
# timeoverlay = " "
# if self.CLOCKOVERLAY:
# clockoverlay = """clockoverlay font-desc="Verdana bold 50" ! """
# else:
# clockoverlay = " "
# # @TO-DO: do using gi.repository.Gst - gst-launch-1.0
# cmd = """gst-launch-1.0 \
# videotestsrc pattern=%s ! \
# video/x-raw,width=%s,height=%s ! \
# %s \
# %s \
# gdppay ! \
# tcpclientsink port=%s """ %(self.pattern, self.WIDTH, self.HEIGHT, timeoverlay, clockoverlay, str(self.port))
# print cmd
# proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, bufsize=-1, shell=False)
# print "created process:", proc, proc.pid
# return proc

# def end(self):
# """Stops the TestVideoSrc
# """
# proc = self.proc
# ret = True
# try:
# proc.terminate()
# print "TestVideo pattern:%s killed" %(self.pattern)
# except:
# ret = False
# return ret


# def get_pattern(self, pattern):
# """Generates a random patern if not specified
# """
# print pattern
# if pattern==None:
# pattern = random.randint(0,20)
# pattern = str(pattern)
# print pattern
# return pattern

0 comments on commit aa50ca6

Please sign in to comment.