i'm trying test udp streaming on localhost it's not showing anything:
videotestsrc (or audiotestsrc) -> udpsink (port: 5078, host: 127.0.0.1)
here code:
console_out_inf("testing", "starting work test elements"); gint port = 5078; // test pipeline out gst_bin_add_many(gst_bin(gsd->pipetest_out), gsd->testsrc, gsd->udpsink, null); gchar* host = "127.0.0.1"; g_object_set(gsd->udpsink, "port", port, null); g_object_set(gsd->udpsink, "host", host, null); if (!gst_element_link(gsd->testsrc, gsd->udpsink)) console_out_bad("streaming", "error linking test udp elements -- send"); else console_out_yes("streaming", "correctly linked test udp elements -- send"); // test pipeline in gst_bin_add_many(gst_bin(gsd->pipetest_in), gsd->udpsrc, gsd->autovideosink, null); gst_element_set_state(gsd->udpsrc, gst_state_null); g_object_set(gsd->udpsrc, "port", port, null); if (!gst_element_link(gsd->udpsrc, gsd->autovideosink)) console_out_bad("streaming", "error linking test udp elements -- receive"); else console_out_yes("streaming", "correctly linked test udp elements -- receive"); // play test pipeline out gststatechangereturn ret1; ret1 = gst_element_set_state(gsd->pipetest_out, gst_state_playing); if (ret1 == gst_state_change_failure) console_out_bad("testing", "failed playing pipetest out"); else console_out_yes("testing", "correctly played pipetest out"); // play test pipeline in gststatechangereturn ret2; ret2 = gst_element_set_state(gsd->pipetest_in, gst_state_playing); if (ret2 == gst_state_change_failure) console_out_bad("testing", "failed playing pipetest in"); else console_out_yes("testing", "correctly played pipetest in"); // print pipelines gst_debug_bin_to_dot_file(gst_bin(gsd->pipetest_out), gst_debug_graph_show_all, "pipetest_out"); gst_debug_bin_to_dot_file(gst_bin(gsd->pipetest_in), gst_debug_graph_show_all, "pipetest_in");
this "my own console output":
edit: not relevant anymore! instanciated fine, pipeline built correctly, yet with
pipeline out: videotestsrc --> udpsink (host:127.0.0.1, port: 5078)
pipeline in: udpsrc (port: 5078) --> autovideosink
the autovideosink not display anything! checking netstat -a, no connection on such port showed.
additional info:
- the graph generated "gstreamer debugging" contains of course video/audio testsrc element connected udpsink.
- the first time run code, "windows firewall window" appeared, guess being sent/received.
- this inside visual studio 2013/qt5 add-in project, should not issue
does know doing wrong?
this code seems fine doesn't relate console output posted.
try testing pipeline piece piece command line gst-launch:
gst-launch-1.0 -e -v videotestsrc ! udpsink host="127.0.01"
connected fakesink first , swapping in udp sink, once have working in command line mirror command in code.
try host="localhost" or host="192.168.0.1" can't remember think udpsink might have trouble sending loopback
Comments
Post a Comment