I am getting a 'Could not demultiplex stream' when trying to use the souphttpsrc for a camera source sending MJPEG.
I believe the issue is because unable to link the MultipartDemux and JpegDec. Wireshark shows the JPEG image packets coming from the source but they will stop after a few with a "TCP Window Full" and "Tcp ZeroWindow" Wireshark messages. Assuming this is because I am not processing the packets. Code Samples source = gst_element_factory_make("souphttpsrc", "http-src"); multidemux = gst_element_factory_make("multipartdemux", "demuxer"); jpegdec = gst_element_factory_make("jpegdec", "jpegdec"); vsink = gst_element_factory_make("autovideosink", "videosink"); ... gst_bin_add_many(GST_BIN(mPipeline), source, multidemux, jpegdec, vsink, NULL); ... if (gst_element_link(multidemux, jpegdec) == FALSE) { DebugMessage("Link between multidemux, jpegdec failed.\n"); } Also tried caps = gst_caps_from_string("image/jpeg,width=320,height=240,framerate=5/1"); if (gst_element_link_filtered(multidemux, jpegdec, caps) == FALSE) { DebugMessage("CAPS Link between multidemux, jpegdec failed.\n"); } I cannot easily use gst-launch to test the elements because the source requires 'Cookie' value based on a session id received from a previous login that will timeout. Any suggestions. Do I have to use multipartdemux to process MJPEG? It was the element I found with a boundary setting. g_object_set(multidemux, "boundary", "--myboundary", NULL); Thanks |
On Wed, 2016-03-02 at 08:08 -0800, RobAtBCIS wrote:
Hi, > I am getting a 'Could not demultiplex stream' when trying to use the > souphttpsrc for a camera source sending MJPEG. > I believe the issue is because unable to link the MultipartDemux and > JpegDec. > > Wireshark shows the JPEG image packets coming from the source but > they will > stop after a few with a "TCP Window Full" and "Tcp ZeroWindow" > Wireshark > messages. Assuming this is because I am not processing the packets. > > Code Samples > source = gst_element_factory_make("souphttpsrc", "http-src"); > multidemux = gst_element_factory_make("multipartdemux", > "demuxer"); > jpegdec = gst_element_factory_make("jpegdec", "jpegdec"); > vsink = gst_element_factory_make("autovideosink", "videosink"); > ... > gst_bin_add_many(GST_BIN(mPipeline), source, multidemux, jpegdec, > vsink, > NULL); > ... > if (gst_element_link(multidemux, jpegdec) == FALSE) > { > DebugMessage("Link between multidemux, jpegdec failed.\n"); > } This is because multipartdemux has so-called 'sometimes' pads, which is pads that are only added once data flow starts, so you can't link multipartdemux and jpegdec yet at that point, because multipartdemux doesn't have any output pads yet at that point. You have to g_signal_connect() to the "pad-added" signal and then link the pad to jpegdec in the callback. Or use gst_parse_launch() and friends to create your pipeline, it will just handle this automatically. Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |