Wowza Community

StreamName missing in function onMediaStreamCreate

I have compiled a wowza class, say

[HTML]package com.vigileyes.wms.module;

import java.io.BufferedReader;

import java.io.DataOutputStream;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.net.HttpURLConnection;

import java.net.URL;

import com.wowza.wms.logging.WMSLoggerFactory;

import com.wowza.wms.stream.IMediaStream;

import com.wowza.wms.stream.IMediaStreamNotify;

import com.wowza.wms.stream.IMediaStreamActionNotify;

public class MyMediaStreamListener implements IMediaStreamNotify, IMediaStreamActionNotify

{

@Override

public void onMediaStreamCreate(IMediaStream stream)

{

WMSLoggerFactory.getLogger(null).info("onMediaStreamCreate: " + stream.getName());

}

@Override

public void onMediaStreamDestroy(IMediaStream stream)

{

WMSLoggerFactory.getLogger(null).info("onMediaStreamCreate: " + stream.getName());

}

}[/HTML]

I am getting the stream name when the stream got destroyed. But it is missing in StreamCreate method.

Please help me.

Hi,

The problem here is the call to onMediaStreamCreate is too early in the life of the stream to return a value. It would have to be returned after the stream is played or published, for example using the onPlay or onPublish methods IMediaStreamActionNotify.

Paul