Hi all,
I am new to gstreamer and I want to find out more on gst_parse_launch function. I understand that if the pipeline is working it will return a NULL and if is not working then it will return a non NULL. However, I this pipeline using gst-launch-1.0 and is working and when I use gst_parse_launch to launch my pipeline it returns me a non NULL. Below is the pipeline that I use: gst-launch-1.0 udpsrc port=15004 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! xvimagesink sync=false async=false -e -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le 28 nov. 2017 3:47 AM, "qjqj" <[hidden email]> a écrit : Hi all, Did you pass that -e ? This one is command line only. You could have print the GError to get more details from the parser.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
The -e option is valid when using gst-launch from the command line. Remove it from your pipeline as it is causing the syntax error. Le Mercredi 29 novembre 2017 2h08, qjqj <[hidden email]> a écrit : Hi, I tried both with -e and without -e, the error I got was this: [gstreamer] initialized gstreamer, version 1.8.3.0 [gstreamer] gstreamer decoder failed to create pipeline [gstreamer] (syntax error) [gstreamer] failed to init gstCamera gst-camera: failed to initialize video device Which is from parser, and here is my source code: bool gstCamera::buildLaunchStr() { std::ostringstream ss; //open ip camera ss << " udpsrc port=15004 !"; ss << " application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse !"; ss << " queue ! avdec_h264 ! xvimagesink sync=false async=false -e"; mLaunchStr = ss.str(); printf(LOG_GSTREAMER "gstreamer decoder pipeline string:\n"); printf("%s\n", mLaunchStr.c_str()); return true; } bool gstCamera::init() { GError* err = NULL; // build pipeline string if( !buildLaunchStr() ) { printf(LOG_GSTREAMER "gstreamer decoder failed to build pipeline string\n"); return false; } // launch pipeline mPipeline = gst_parse_launch(mLaunchStr.c_str(), &err); if( err != NULL ) { printf(LOG_GSTREAMER "gstreamer decoder failed to create pipeline\n"); printf(LOG_GSTREAMER " (%s)\n", err->message); g_error_free(err); return false; } // get the appsrc GstElement* appsinkElement = gst_bin_get_by_name(GST_BIN(pipeline), "mysink"); GstAppSink* appsink = GST_APP_SINK(appsinkElement); if( !appsinkElement || !appsink) { printf(LOG_GSTREAMER "gstreamer failed to retrieve AppSink element from pipeline\n"); return false; } mAppSink = appsink; // setup callbacks GstAppSinkCallbacks cb; memset(&cb, 0, sizeof(GstAppSinkCallbacks)); cb.eos = onEOS; cb.new_preroll = onPreroll; cb.new_sample = onBuffer; gst_app_sink_set_callbacks(mAppSink, &cb, (void*)this, NULL); return true; } -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |