I've read and tried the code from:
The calls via HTTP work fine.
However, I'm trying to use the same code to start or stop streams in the onPublish() method, when the stream comes online.
dvrRecorder = stream.getDvrRecorder(IDvrConstants.DVR_DEFAULT_RECORDER_ID);
dvrRecorder.startRecording(); // nullpointer exception
I've tried both with the property startRecordingOnStartup=true & false
But the dvrRecorder instance, is never there.
How do you suggest I solve this?
Can I maybe force the init of the dvrRecorder via:
dvrRecorder.init(streamName, recorderName, appInstance, dvrRecorderItem) ?
I'd rather not fire a timer that waits a few seconds after I've received the onPublish()
Kind regards, Jim