代码之家  ›  专栏  ›  技术社区  ›  Brad Grissom

gstreamer客户端多播UDP在多个接口启动时不连接

  •  2
  • Brad Grissom  · 技术社区  · 10 年前

    我正在使用gstreamer连接到一个流视频,它是通过原始UDP多播的原始H.264基本流。我发现当我有 只有 eth0 向上,连接良好:

    gst-launch udpsrc uri=udp://239.255.43.43:4444 ! h264parse ! ffdec_h264 ! xvimagesink sync=false
    

    然而,当我提出这两个问题时 wlan0 乙醇0 我有问题。我使用 wlan0 作为我的主要互联网连接和 乙醇0 在我的本地局域网上,流媒体视频服务器就在那里 wlan0 作为默认路线:

    host$ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
    

    当我尝试以这种配置连接时,gstreamer就位于 select() 呼叫等待连接。

    1 回复  |  直到 10 年前
        1
  •  7
  •   Brad Grissom    10 年前

    解决方案是告诉gstreamer使用哪个接口接收多播UDP流:

    gst-launch udpsrc multicast-iface="eth0" uri=udp://239.255.43.43:4444 ! h264parse ! ffdec_h264 ! xvimagesink sync=false