Gstreamer Mac OS X udpsink error

前端 未结 3 2158
离开以前
离开以前 2021-02-11 00:47

I’m trying to stream audio in Mac OS X but I keep getting this error:

gst-launch osxaudiosrc ! audioresample ! audioconvert ! alawenc ! rtppcmapay ! udpsink port         


        
3条回答
  •  生来不讨喜
    2021-02-11 01:27

    There is a bug in the udpsink/multiudpsink code related to IPV6 enabled systems and socket creation.

    If you are coding up your pipeline in C you can bypass this by manually creating the socket to use and using that for the sink like so.

    my_sink = gst_element_make_from_uri(GST_URI_SINK, "udp://233.34.28.1:31337", NULL);
    int my_tx_socket;
    my_tx_socket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)
    g_object_set(G_OBJECT(my_sink), “sockfd”, my_tx_socket, NULL);
    

    If you were just going to use it using gst-launch I'm afraid that you will have to edit your way through multiudpsink.c until you figure out how to bypass thus.

提交回复
热议问题