Can not create RTP capabilities

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

Can not create RTP capabilities

CC
Version: GStreamer 1.10.2
Platform: macOS 10.13 Beta

I use the command , and it works well. And I implement it by C , but the RTP capabilities is not available。

gst-launch-1.0 -v udpsrc port=12347 ! application/x-rtp,payload=107,encoding-name=H264 ! rtph264depay ! queue ! mux. udpsrc port=12345 ! application/x-rtp,payload=111,encoding-name=OPUS,clock-rate=48000, channels=2 ! rtpopusdepay ! opusparse ! opusdec ! queue ! voaacenc bitrate=128000 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! queue ! flvmux streamable=true name=mux ! queue ! rtmpsink location=rtmp://localhost:1935/myapp/testav


The code I create rtph264depay RTP capabilities is below.

...
    GstCaps *caps;

    caps = gst_caps_new_simple ("application/x-rtp",
                                "encoding-name", G_TYPE_STRING, "H264",
                                "payload", G_TYPE_INT, 107, NULL);

    if (!GST_IS_CAPS(caps)) {
        g_printerr ("caps null ??.\n");
        return -1;
    }
...








CC
Reply | Threaded
Open this post in threaded view
|

Re: Can not create RTP capabilities

CC
BTW:  I also try "gst_caps_new_full" and "gst_caps_from_string("application/x-rtp, payload=(int)107, encoding-name=(string)H264, media=(string)video, clock-rate=(int)90000")"  method , both failed .
Reply | Threaded
Open this post in threaded view
|

Re: Can not create RTP capabilities

Nicolas Dufresne-5
In reply to this post by CC
Le mardi 27 juin 2017 à 20:03 -0700, CC a écrit :

> The code I create rtph264depay RTP capabilities is below.
>
> ...
>     GstCaps *caps;
>
>     caps = gst_caps_new_simple ("application/x-rtp",
>                                 "encoding-name", G_TYPE_STRING,
> "H264",
>                                 "payload", G_TYPE_INT, 107, NULL);
>
>     if (!GST_IS_CAPS(caps)) {
>         g_printerr ("caps null ??.\n");
>         return -1;
>     }
> ...
I have simply copy pasted your test and ran it, it works. Did you
forget to call gst_init() ?

You can find the test here, see first line for compilation:
https://paste.fedoraproject.org/paste/yZvnpiiHjXdftWlYHao1Wg

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
CC
Reply | Threaded
Open this post in threaded view
|

Re: Can not create RTP capabilities

CC
Thank you , it works.
CC
Reply | Threaded
Open this post in threaded view
|

Re: Can not create RTP capabilities

CC
In reply to this post by Nicolas Dufresne-5
Hi,

May I ask you another question ?

This is the code of the command implement and the debug log.  
Code : https://gist.github.com/zombiecong/3dbd844cdcb04b6205d513eafbfb68b4
Log : https://gist.github.com/zombiecong/1b283f390474646fe45f19fed52b1662

It seems some problem with the audio udpsrc.

error :

0:00:00.112859000 57836 0x7fae5e8400f0 INFO                 basesrc gstbasesrc.c:2860:void gst_base_src_loop(GstPad *):<audio-udp-src> pausing after gst_pad_push() = not-linked
0:00:00.112885000 57836 0x7fae5e8400f0 WARN                 basesrc gstbasesrc.c:2950:void gst_base_src_loop(GstPad *):<audio-udp-src> error: Internal data stream error.
0:00:00.112893000 57836 0x7fae5e8400f0 WARN                 basesrc gstbasesrc.c:2950:void gst_base_src_loop(GstPad *):<audio-udp-src> error: streaming stopped, reason not-linked (-1)

Thanks for your help.
CC
Reply | Threaded
Open this post in threaded view
|

Re: Can not create RTP capabilities

CC
In reply to this post by Nicolas Dufresne-5
Forget it .  It is my silly fault.