【问题标题】:Any way to obtain FileDescriptor with Mono(.net)?有什么方法可以使用 Mono(.net) 获取 FileDescriptor?
【发布时间】:2014-01-10 00:26:00
【问题描述】:

可能,这是一个复杂的问题,但我会尝试拍摄。

我使用 Monodroid(Android 的 Mono),并尝试将媒体流实现到 UDP 套接字。

Best way to stream audio and video from an Android phone to a RTMP server

这对我来说是一个有用的指针,因此可以利用 FileDescriptor

但是,基本上,FileDescriptor 是一个面向 UNIX 的概念,而 Mono(.net) 是面向 Windows 的概念,UDPClient class of .net 似乎不支持为实例获取 FileDescriptor。

有什么方法可以通过 Mono(.net) 获取 FileDescriptor 吗?

【问题讨论】:

    标签: c# android mono xamarin.android file-descriptor


    【解决方案1】:

    Android 似乎本身不支持 UDP 流:Network Protocols,所以是的,您应该寻找 RTMP 服务器选项,不,您可能无法使用 UdpClient

    Best way to stream audio and video from an Android phone to a RTMP server 的答案中的代码很容易转换为 C#。 LocalServerSocketLocalSocketLocalSocketAddressAndroid.Net 命名空间中,FileDescriptorJava.IO 中也是如此。

    【讨论】:

    • 非常感谢,Aaron,我正在查看您的答案和我的代码,很快就会回来报告。
    • 毕竟,我将我的 Android 项目切换到 Java 基础,并与您的评论相关,我在这里打开了一个新问题:stackoverflow.com/questions/21072763/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-01-11
    • 2012-02-19
    • 1970-01-01
    • 2020-07-02
    • 2010-12-21
    • 1970-01-01
    • 2016-11-16
    相关资源
    最近更新 更多