实现机器人在点播服务器

实现机器人在点播服务器

本文介绍了实现机器人在点播服务器(接收器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建的单曲中的Andr​​oid在我的Andr​​oid设备将作为点播服务器(接收器)和iPhone设备将作为一个接收器。我已经在我的应用程序,它是在java中的单曲开源库使用jmdns。它工作正常的声音。但是,当我来到了视频和图像,然后有很多,甚至与设备的发现我的奋斗。这里是我的code为创建和注册该服务:

I want to create the airplay in android in which my android device will work as a airplay server(receiver)and iPhone device will work as a receiver . I have used jmdns in my application which is open source library in java for the airplay . It is working fine for the audio . But when I come to the video and image then there is lot of struggle for me even with the discovery of the device .Here is my code for the creating and registering the service :

    ServiceInfo info = ServiceInfo.create(identifier + "@" + name + "._raop._tcp.local", identifier + "@" + name, port, "tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1");

        dns = JmmDNS.Factory.getInstance();
        ((JmmDNSImpl)dns).inetAddressAdded(new NetworkTopologyEventImpl(JmDNS.create(InetAddress.getByName("localhost")), InetAddress.getByName("localhost")));

        try {
            Thread.sleep(1000); // If this isn't done the Announcement sometimes doesn't go out on the local interface
        } catch (InterruptedException e) {
            e.printStackTrace(System.err);
        }

        dns.registerService(info);

当我更改._raop在第一线的._airplay则该设备已被发现在iPad上的图像和音频。当我选择的设备播放视频的它显示消息:此视频播放的Andr​​oid(服务器名)。但是在服务器端,我没有得到任何数据包处理。我研究Jmdns很多。但我没有得到如何实现视频和图像的点播使用jmdns。任何想法?

when i change that ._raop in the first line to the ._airplay then the device has been discovered for the image and audio in the iPad. When i select the device for playing the video the it show the message "This video is playing android(server name )". But in server side i am not getting any packets to process. I am studied Jmdns lot . But i am not getting how to implement the video and image in the airplay using jmdns . Any ideas ?

推荐答案

您需要一个流媒体服务器。 FFmpeg的在我看来,一个有趣的地方开始。请参阅 ffserver的组成部分。

You need a streaming server. FFmpeg seems to me an interesting place to start. See the ffserver component.

下面是关于如何把它包在的ffmpeg-java的一个很好的教程

Here is a nice tutorial on how to wrap it in ffmpeg-java.

这篇关于实现机器人在点播服务器(接收器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 08:58