मैं पाइथन के साथ एक जीस्ट्रीमर एप्लिकेशन तारित कर रहा हूं।पायथन के जीएसटी के जीस्ट्रीमर। लिंक्स त्रुटि समस्या
import pygst
pygst.require('0.10')
import gst
import pygtk
pygtk.require('2.0')
import gtk
# this is very important, without this, callbacks from gstreamer thread
# will messed our program up
gtk.gdk.threads_init()
def main():
pipeline = gst.Pipeline('pipleline')
filesrc = gst.element_factory_make("filesrc", "filesrc")
filesrc.set_property('location', 'C:/a.mp3')
decode = gst.element_factory_make("decodebin", "decode")
convert = gst.element_factory_make('audioconvert', 'convert')
sink = gst.element_factory_make("autoaudiosink", "sink")
pipeline.add(filesrc, decode, convert, sink)
gst.element_link_many(filesrc, decode, convert, sink)
pipeline.set_state(gst.STATE_PLAYING)
gtk.main()
main()
और त्रुटि:: और मैं निम्नलिखित कोड के साथ एक LinkError मिल
ImportError: could not import gio
Traceback (most recent call last):
File "H:\workspace\ggg\src\test2.py", line 37, in <module>
main()
File "H:\workspace\ggg\src\test2.py", line 31, in main
gst.element_link_many(filesrc, decode, convert, sink)
gst.LinkError: failed to link decode with convert
यह बहुत अजीब बात है, एक ही पाइप लाइन के साथ है, लेकिन parse_launch के साथ बनाया गया है, यह काम करता है। क्यों मैनुअल एक में विफल रहा है
import pygst
pygst.require('0.10')
import gst
import pygtk
pygtk.require('2.0')
import gtk
# this is very important, without this, callbacks from gstreamer thread
# will messed our program up
gtk.gdk.threads_init()
def main():
player = gst.parse_launch('filesrc location=C:/a.mp3 ! decodebin ! audioconvert ! autoaudiosink')
player.set_state(gst.STATE_PLAYING)
gtk.main()
main()
यहाँ, सवाल आता है, लेकिन पार्स एक सफलता: यहाँ कोड है? इसमें गलत क्या है? मेरे द्वारा यह कैसे किया जा सकता है?
धन्यवाद।
, मुझे आपके द्वारा सूचीबद्ध पहली त्रुटि नहीं मिली है: "आयात त्रुटि: जीओ आयात नहीं कर सका"। मैं उन्हें बाकी प्राप्त करता हूं, हालांकि, नीचे –