0
rtspsrcからtcpserversinkにプロキシを作成する必要があります。gstreamerプロキシrtspsrcからtcpserver
Face Pipeline Error! Error: Internal data flow error. [Debug details: gstbasesrc.c(2625): gst_base_src_loop(): /GstPipeline:stream-camera/GstRTSPSrc:my_rstp/GstUDPSrc:udpsrc0: streaming task paused, reason not-linked (-1)]
理由:この行は
gst-launch-0.10 rtspsrc location=rtsp://192.168.111.203:8554/video ! capsfilter caps='application/x-rtp,payload=26' ! rtpjpegdepay ! queue ! multipartmux ! tcpserversink port=5555
を動作しますが、このコードは
void Video_Initialise_RTSP (const char* pAddress, int Port){
gVideoInit = 0;
gVideoStream = 0;
GError *error = NULL;
/* Initialize Gstreamer */
gst_init (0, NULL);
pipeline = gst_pipeline_new ("stream-camera");
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_add_signal_watch (bus);
g_signal_connect (bus, "message", (GCallback) cb_message, pipeline);
rtsp_src = gst_element_factory_make ("rtspsrc", "my_rstp");
const char * rtsp_url = "rtsp://192.168.111.203:8554/video";
g_object_set (G_OBJECT (rtsp_src), "location", rtsp_url, NULL);
caps_filter_rtsp = gst_element_factory_make ("capsfilter", "caps_filter_rtsp");
GstCaps * caps = gst_caps_new_simple ("application/x-rtp",
"payload", G_TYPE_INT, 26, NULL);
g_object_set (G_OBJECT (caps_filter_rtsp), "caps", caps, NULL);
rtpdepay = gst_element_factory_make ("rtpjpegdepay", "rtpjpeg_depay");
rtsp_queue = gst_element_factory_make ("queue", "rtsp_queue");
mux_filter = gst_element_factory_make ("multipartmux", "mux_filter");
image_sink = gst_element_factory_make ("tcpserversink", "image_sink");
g_object_set (G_OBJECT (image_sink), "host", "localhost", "port", 5555, NULL);
gst_bin_add_many (GST_BIN (pipeline), rtsp_src, caps_filter_rtsp, rtpdepay, dec_filter,
rtsp_queue,
mux_filter, image_sink, NULL);
gst_element_link_many (rtsp_src, caps_filter_rtsp, rtpdepay, dec_filter,
rtsp_queue,
mux_filter, image_sink, NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
}
int main (int argc, char *argv[]){
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
Video_Initialise_RTSP("localhost", 5555);
g_main_loop_run (loop);
return 0;
}
出力プログラムを動作しないのですか?私は間違っている?