0
gstreamer 파이프 라인을 동적으로 변경하려고했지만 상태를 변경하는 즉시 스트림을 중지합니다. 내가 여기서 뭘하고있는거야? 여기 내 코드는 다음과 같습니다.Gstreamer 파이프 라인 동적 변경 Python
#!/usr/bin/python
import gobject
import time
gobject.threads_init()
import pygst
pygst.require("0.10")
import gst
p = gst.parse_launch("""filesrc location=/home/jango/Pictures/4.jpg name=src1 ! decodebin ! queue ! videoscale ! ffmpegcolorspace !
imagefreeze ! capsfilter name=vfps caps="video/x-raw-yuv, framerate=60/1, width=640, height=420" ! theoraenc ! oggmux name=mux ! filesink location=1.ogg""")
p.set_state(gst.STATE_PLAYING)
time.sleep(10)
print "State change"
p.set_state(gst.STATE_READY)
source = p.get_by_name("src1")
source.set_property("location", "/home/jango/Pictures/2.jpg")
p.set_state(gst.STATE_PLAYING)
gobject.MainLoop().run()
제가 참조 할 수있는 다른 방법이나 튜토리얼이 있다면 제게 제안 해주십시오. 미리 감사드립니다.