[SOLVED] UDPSRC AUDIO PIPELINE: assertion 'gst_uri_is_valid (uri)' failed

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[SOLVED] UDPSRC AUDIO PIPELINE: assertion 'gst_uri_is_valid (uri)' failed

mapcol
This post was updated on .
I try to run this pipeline starting from udpsrc up to an autoaudiosink on Visual Studio 2013 but I can't make it work:

#include <gst\gst.h>
#include <gst\rtp\rtp.h>

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <Windows.h>

GMainLoop* loop = NULL;
GstElement* pipe = NULL;

// patterns
const char* pattern_1 = "udpsrc port=5521 ! \"application/x-rtp, media=(string)audio, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)L16\" !  rtpjitterbuffer ! rtpL16depay ! decodebin ! audioconvert ! audioresample ! autoaudiosink";

int main(int argc, char *argv[])
{

        gst_init(&argc, &argv);

        loop = g_main_loop_new(NULL, FALSE);

        pipe = gst_parse_launch(pattern_1, NULL);
        if (pipe == NULL)
                std::cout << "Pipeline failed" << std::endl;
        else
                std::cout << "Pipeline correct" << std::endl;
        g_main_loop_run(loop);

        gst_element_set_state(pipe, GST_STATE_PLAYING);
       
        system("pause");
        return 0;
}

But I get the following error on the conosle:

(ConsolePipelineTester.exe:6464): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
Pipeline correct


Does anyone know how to solve this? practically I'm not able to receive udp streaming. All pipeline that reproduce media or send via udp work well
Reply | Threaded
Open this post in threaded view
|

Re: (ConsolePipelineTester.exe:6464): GStreamer-CRITICAL **: UDPSRC AUDIO PIPELINE: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

Tim Müller
On Thu, 2016-08-25 at 08:02 -0700, mapcol wrote:

Hi,

> // patterns
> const char* pattern_1 = "udpsrc port=5521 ! \"application/x-rtp,
> media=(string)audio, payload=(int)96, clock-rate=(int)90000,
> encoding-name=(string)L16\" !  rtpjitterbuffer ! rtpL16depay !
> decodebin !
> audioconvert ! audioresample ! autoaudiosink";
>
> ...
> But I get the following error on the conosle:
>
> *(ConsolePipelineTester.exe:6464): GStreamer-CRITICAL **:
> gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
> Pipeline correct*

Does this pipeline work from gst-launch-1.0.exe?

I suspect what happens is that this is gst_parse_launch() reporting a
syntax error in a rather confusing way.

The \"...\" bits surrounding the rtp caps are usually only needed when
using a shell to make sure it's all one single argument, but it's not
needed if you have a pipeline string.

Try removing these quotes from the string, and get rid of the spaces
after the commas.

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
Reply | Threaded
Open this post in threaded view
|

Re: (ConsolePipelineTester.exe:6464): GStreamer-CRITICAL **: UDPSRC AUDIO PIPELINE: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

mapcol
Yes it was the \".

Apperently in the console they work with them while when you use the pipeline in gst_parse_launch() you don't need them.

Thankyou