Wowza Community

Push Publish From Server API

Hey all,

I’m trying to programmatically create/remove push publish entries to stream mpegts to localhost over some port. I’ve gotten it working via REST, but I’ve been having difficulties getting it to work via java.

Judging by the API docs, I figured I would have to do something like:

        PushPublishRTP pushPublishBase = new PushPublishRTP();
        pushPublishBase.setPort(port);
        pushPublishBase.setHost("127.0.0.1");
        pushPublishBase.setRTPWrapped("false");
        pushPublishBase.setEntryName(entryName);
        pushPublishBase.setDstStreamName(output_name);
        IPushPublishSession iPushPublishSession = pushPublishBase.createPushPublishSession();
        appInstance.addPushPublishSession(stream, iPushPublishSession);

But when I do that, the PushPublishMap.txt does not change. What am I missing?

Thanks,

James

Hello

The txt configuration should not change in this scenario as you are programmatically initiating the push publish instance. Please take a look at the following example (click the example download) for further review/testing.

Thanks,

Matt

Makes sense, thanks Matt!