Wowza Community

Adaptive stream switch tracking

I’m attempting to write a custom module to track when the different adaptive streams are requested (both for Cupertino and SmoothStreaming). I’ve created a module that extends ModuleBase, and I’m focusing on the methods

onHTTPSmoothStreamingStreamerRequest (HTTPStreamerSessionSmoothStreamer httpSession, HTTPStreamerSmoothStreamingRequestContext reqContext)

onHTTPCupertinoStreamerRequest (HTTPStreamerSessionCupertino httpSession, HTTPStreamerCupertinoRequestContext reqContext)

The problem is that the documentation on these methods is sparse, if not non-existent. I cannot get any output to my log files from any statements I put in these methods, which leads me to believe that they aren’t being called.

I’ve read this


and this

with no luck.

Is there any better documentation available on these methods, or any working examples I can refer too?


You do need to make sure you are running 4.1.0 at least for this to work. An example implementation would be

public void onHTTPSmoothStreamingStreamerRequest(HTTPStreamerSessionSmoothStreamer httpSession, HTTPStreamerSmoothStreamingRequestContext reqContext)
       IHTTPRequest req = reqContext.getRequest();
       Map<String, String> map = req.getHeaderMap();
       // if the request is missing “my favorite header, reject the session
       if (!map.containsKey("my favorite header"))

You will need to pull apart the request and headers to see what is being requested. You can also use the IVHostHTTPStreamerRequestValidator interface and a quick google did find some examples of implementing this.


Thanks for the information, I was able to make some progress.

However, I’m still not able to find what I’m looking for. I’m trying to determine which video file (as specified in the smil file) is being streamed. The log entries that I’m able to produce seem to either reference the smil file itself, or the individual chunks. Is there a way to get the info I’m looking for?