David 9 tahun lalu
induk
melakukan
49857be8ed
1 mengubah file dengan 0 tambahan dan 8 penghapusan
  1. 0 8
      camera1/cam.py

+ 0 - 8
camera1/cam.py

@@ -20,7 +20,6 @@ def bus_call(bus, msg, *args):
 	return True
 
 zoom = 1
-preview = False
 direction=1
 def quit():
 	pipeline.send_event(Gst.Event.new_eos())
@@ -76,7 +75,6 @@ def control():
 			line=fifo.read().strip()
 			if line=="preview":
 				set_preview()
-				continue
 			if line=="nopreview":
 				unset_preview()
 			if "zoom=" in line:
@@ -107,14 +105,8 @@ if __name__ == "__main__":
 
 	sink = pipeline.get_by_name ("out")
 	sink.set_property("clients", ",".join(["192.168.2.120:5000"]))
-	#sink.set_property("clients", ",".join(["192.168.1.7:5000"]))
 	print(sink.get_property("clients"))
 
-	# this will call set_saturation every 1s
-	#GObject.timeout_add(520, set_zoom, pipeline)
-	#zoomin = GObject.timeout_add(80, set_zoom, pipeline)
-	#GObject.timeout_add(1000, toggle_preview, pipeline)
-
 	# run
 	pipeline.set_state(Gst.State.PLAYING)
 	t = threading.Thread(target=control, daemon=True)