在Android应用程序中使用DIAL协议 [英] Using DIAL Protocol in Android application

查看:126
本文介绍了在Android应用程序中使用DIAL协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的视频流应用程序中使用DIAL协议,我的应用程序是一个示例应用程序,仅使用VideoView播放HLS示例流.

I want to use DIAL Protocol in my video streaming application, my application is an sample application and only plays HLS sample stream using VideoView.

我想在以下位置集成DIAL协议( http://www.dial-multiscreen.org )我的应用程序可以在电视或其他DIAL支持的服务器设备上流式传输视频.我有几个问题.

I want to integrate DIAL protocol (http://www.dial-multiscreen.org) in my application to stream the video on TV or other DIAL supported server devices. I have few questions.

  1. 是我需要同时实现服务器还是客户端,还是仅实现客户端?
  2. 我可以在两台Android手机上测试此客户端和服务器,还是需要使用DIAL支持的电视作为服务器应用程序?
  3. 在DIAL网站上,他们提供了CPP示例应用程序,所以我需要重用此示例中的代码,并在此代码之上编写JNI以便在Android中使用.或有适用于Android的SDK/Lib协议实现.
  4. 我在哪里可以找到适用于Android的示例.
  5. 我只是出于示例/测试目的这样做,所以是否需要注册规格文件中提到的应用程序名称?

推荐答案

1).仅在要与现有服务器应用程序对话(例如与智能电视或通过电话应用程序与Chromecast对话)时,才需要实现客户端.如果这样做,您基本上将构建一个应用程序来执行诸如通过电话触发在电视上播放YouTube视频的操作.如果要实现播放不同的媒体,则还需要实现DIAL服务器.

1). You only need to implement the client if you are going to be talking to existing server apps (like talking to a smart TV or Chromecast from a phone app). If you do this, you will basically be building an app to do things like trigger playing YouTube videos on a TV from a phone. If you want to implement playing back different media, you will need to implement a DIAL server as well.

2).您可以在实现DIAL协议服务器端的任何服务器上对其进行测试,因此,可以使用两部电话作为概念证明,但是实际上将客户端和服务器都放在电话上并不是很有用.让客户端在电话上运行而服务器从PC上运行将是更现实的情况,或者在实现DIAL服务器端协议的智能电视或Chromecast上进行测试.如果您使用两部手机进行测试,则肯定需要同时实现DIAL协议的服务器端和客户端.

2). You can test it with any server that implements the server-side of the DIAL protocol, so two phones would be fine as a proof of concept but having the client and server both be on phones isn't very useful in practice. Having the client run on a phone and the server run from a PC would be a more realistic situation, or test against a smart TV or Chromecast that implements the DIAL server side protocol. If you test using two phones, you will definitely need to implement both the server and client side of the DIAL protocol.

3)当然,您不需要使用示例代码.使用标准的讲HTTP的类在Java中实现协议可能会更简单.不知道现有的Java实现,但是实现起来并不难.

3) You're certainly not required to use the sample code. Implementing the protocol in Java using standard HTTP-speaking classes would probably be simpler. Don't know of an existing Java implementation, but it wouldn't be too hard to implement.

4)不知道可用的示例代码,但是任何支持Chromecast的东西(例如Netflix和YouTube应用程序)都包含DIAL客户端功能-寻找支持流内容到Chromecast的开源应用程序.

4) Don't know of any sample code available, but anything that supports Chromecast (like the Netflix and YouTube apps) includes DIAL client functionality- look around for open-source apps that support streaming content to Chromecast.

5)如果仅实现客户端内容,则无需注册任何名称.仅在要分发服务器应用程序时才需要注册名称.详细信息请参见此处: http://www.dial-multiscreen.org/dial-registry

5) If you are only implementing client-side content, then you have no need to register any names. You need to register a name only if you are going to be distributing server apps. See here for details: http://www.dial-multiscreen.org/dial-registry

这篇关于在Android应用程序中使用DIAL协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆