多协议、性能稳定、丰富API的流媒体服务器软件
如何采用服务端API对rtsp流的播放请求进行访问控制?
下面的代码例子展现了如何使用服务端API对RTSP/RTP流媒体播放请求进行控制。

package com.wowza.wms.example.module;

import com.wowza.wms.rtp.model.*;
import com.wowza.wms.application.*;
import com.wowza.wms.module.*;

public class ModuleAccessControlRTSP extends ModuleBase
{
	public void onRTPSessionCreate(RTPSession rtpSession)
	{
		boolean isGood = true;

		String ipAddress = rtpSession.getIp();
		String queryStr = rtpSession.getQueryStr();
		String referrer = rtpSession.getReferrer();
		String userAgent = rtpSession.getUserAgent();
		
		IApplicationInstance appInstance = rtpSession.getAppInstance();
		String uriStr = rtpSession.getUri();
		
		// Here you can use the request and session information above to determine 
		// if you want to reject the connection
		// isGood = true/false;
		
		if (!isGood)
			rtpSession.rejectSession();
	}
}