如何与JAVA协商流媒体的red5连接参数

发布于 2024-10-11 22:00:37 字数 640 浏览 4 评论 0 原文

我一直在创建一个瘦浏览器客户端(在java上),它将RTMP流发送到指定的red5实例。我还使用 RTMP Researcher 来监控客户端和服务器之间发生的流量和事件。

这是我注意到的: 显然有一个带有选项的映射正在 red5 实例和客户端之间交换。 你可以在这里看到它: alt text (直接链接:http://img716.imageshack.us/img716/661/newbitmapimagelb.png

我想知道是否有一种编程方式可以在客户端中获取此地图侧面,可能会更改一些参数或只是检查它们

编辑:

我正在像这样连接

connect ( host, port, app, callback );

。我假设我正在发送一些默认参数,因为其他连接方法也有一个 optionsMap 作为参数。我想知道可以放入这样的 optionsMap 中的可能值是什么以及在哪里获取它们的列表?

I have been creating a thin browser client (on java) that sends an RTMP stream to a specified red5 instance. I also use RTMP Researcher to monitor the traffic and events that occur between the client and the server.

Here is what I note:
There is obviously a map with options that is being exchanged between the red5 instance and the client.
You can see it here:
alt text (direct link : http://img716.imageshack.us/img716/661/newbitmapimagelb.png )

What I am wondering about is is there a programmatic way to obtain this map in the client side and maybe change some of the parameters or just examine them

Edit:

I am connecting like this

connect ( host, port, app, callback );

. I assume I am sending some default parameters along, because the other connect methods have also an optionsMap as an argument. I was wondering what are the possible values that could be put in such an optionsMap and where to obtain a list of them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

画离情绘悲伤 2024-10-18 22:00:37

嘿,
我也在与 red5 作斗争并发现了这篇文章。下载 red5 源代码并查看此源文件:src/org/red5/server/net/rtmp/BaseRTMPClientHandler.java

你应该知道connect()方法有多个 签名

BaseRTMPClientHandler.java 中的以下方法创建默认参数:

public Map<String, Object> makeDefaultConnectionParams(String server, int port, String application) {
    Map<String, Object> params = new ObjectMap<String, Object>();
    params.put("app", application);
    params.put("objectEncoding", Integer.valueOf(0));
    params.put("fpad", Boolean.FALSE);
    params.put("flashVer", "WIN 9,0,115,0");
    params.put("audioCodecs", Integer.valueOf(1639));
    params.put("videoFunction", Integer.valueOf(1));
    params.put("pageUrl", null);
    params.put("path", application);
    params.put("capabilities", Integer.valueOf(15));
    params.put("swfUrl", null);
    params.put("videoCodecs", Integer.valueOf(252));
    return params;
}

Hey,
I was also struggling with red5 and found this post. Download the red5 source and look inside this source file: src/org/red5/server/net/rtmp/BaseRTMPClientHandler.java

You should know that the connect() method has multiple signatures.

The following method in BaseRTMPClientHandler.java creates the default parameters:

public Map<String, Object> makeDefaultConnectionParams(String server, int port, String application) {
    Map<String, Object> params = new ObjectMap<String, Object>();
    params.put("app", application);
    params.put("objectEncoding", Integer.valueOf(0));
    params.put("fpad", Boolean.FALSE);
    params.put("flashVer", "WIN 9,0,115,0");
    params.put("audioCodecs", Integer.valueOf(1639));
    params.put("videoFunction", Integer.valueOf(1));
    params.put("pageUrl", null);
    params.put("path", application);
    params.put("capabilities", Integer.valueOf(15));
    params.put("swfUrl", null);
    params.put("videoCodecs", Integer.valueOf(252));
    return params;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文