0
주소에서 라디오를 스트리밍하는 프로그램을 만들고 싶었습니다. 그것은 내가pygst에서 pyGi로 코드 전송하기
import pygst
pygst.require("0.10")
import gst
을했을 때 잘 작동하지만, 그것은 이후 패스
def on_tag(bus, msg):
taglist = msg.parse_tag()
print 'on_tag:'
for key in taglist.keys():
print '\t%s = %s' % (key, taglist[key])
music_stream_uri = 'http://213.8.143.168/91fmAudio'
player = Gst.element_factory_make("playbin", "player")
player.set_property('uri', music_stream_uri)
player.set_state(Gst.STATE_PLAYING)
: 전자로 AttributeError를 제외하고 gi.repository 수입 GST 에서 :
시도 : 나는 다음과 같은 코드를 작성 AttributeError
몇 개를 주었고 모듈이 더 이상 사용되지 않는다는 경고가 표시됩니다. pyGi로 전환하여 가져 왔습니다.
하지만 내가 pi.Gst에 명령 궁금 오류
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.1\helpers\pydev\pydevd.py", line 2222, in <module>
globals = debugger.run(setup['file'], None, None)
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.1\helpers\pydev\pydevd.py", line 1648, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:/Danis/radio/radio.py", line 20, in <module>
player = Gst.element_factory_make("playbin", "player")
File "C:\Python27\lib\site-packages\gi\module.py", line 320, in __getattr__
return getattr(self._introspection_module, name)
File "C:\Python27\lib\site-packages\gi\module.py", line 139, in __getattr__
self.__name__, name))
AttributeError: 'gi.repository.Gst' object has no attribute 'element_factory_make'
을 얻었다는 pygst의 명령에 해당? 아무도이 코드를 PyGi로 전송하는 방법을 알고 있습니까?
고마워하지만 'AttributeError :'gi.repository.Gst '객체에'STATE_PLAYING '속성이 없습니다. –
Gst.State.PLAYING,하지만 필자가 제안한대로 ipython을 연결하고 설치 한 페이지를 실제로보아야합니다.) –
마티유,이 "통역사에게 탭 완성"에 대해 자세히 설명해 주시겠습니까? 단순한 기본 유스 케이스처럼, 이것은 흥미로운 것으로 들린다. – yPhil