I’m trying to learn something about gstreamer and for niw I’m using gstreamer to receive video stream, which is streamed over udp by vlc player. In order to do this, I wrote the following code.
playbin = gst_element_factory_make("playbin2", "play");
g_object_set(G_OBJECT(playbin), "uri", uri.c_str(), NULL);
bus = gst_pipeline_get_bus(GST_PIPELINE(playbin));
gst_bus_add_watch(bus, &bus_watcher, NULL);
gst_object_unref(bus);
gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_PLAYING);
The problem is that video is not displayed. The only thing shown if grey(black/green/blue etc) screen. Sometimes it is possible to see some figures moving there. The situation is a bit better with sound. Most of the time it is recognizable. I tried to set properties like “buffer-duration” and “buffer-size” but the only effect I can mention is the improvement of quality of the sound.
And one more thing. I’ve tried to use usual playbin (meaning not playbin2) and it worked a bit better. At least sound quality increased.
Maybe somebody knows how to solve this problem?
Well, I still cant display video, but it’s not about errors in program or video file format. I’ve managed to display the same video, with the same playbin after I broadcasted it over http.