我需要流rtsp/http流,當我創建一個元素源使用 source = gst_element_make_from_uri(); 它不起作用。有沒有人使用gstreamer來傳輸流rtsp/http流。無法播放使用gstreamer中的gst_element_make_from_uri uri
請幫助..我附上的代碼片段也
source = gst_element_make_from_uri (GST_URI_SRC,"http://76.73.90.27:80/" ,NULL);
decoder = gst_element_factory_make ("mad", "mad-decoder");
sink = gst_element_factory_make ("alsasink", "audio-output");
g_object_set (G_OBJECT (source), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_NULL);
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_add_watch (bus, bus_call, loop);
gst_object_unref (bus);
gst_bin_add_many (GST_BIN (pipeline),
source, decoder,sink, NULL);
gst_element_link_many (source, decoder, sink, NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_main_loop_run (loop);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
我正在開發一個在Ubuntu 10.4上使用Qt的應用程序。我需要使用gstreamer api來流uri的。目前我不使用聲子 – ruby 2010-07-10 06:57:00