Skip navigation
Currently Being Moderated

Gracefully resume DVR stream

Jul 30, 2013 11:43 AM

Tags: #dvrcast #ams

We are using the dvrcast application.  I've modified application.onPublish() to call onStartRecord() on the stream object so that recording automatically starts immediately.  Correspondingly it calls onStopRecord() in application.onUnpublish().  Thre problem is the code looks like this:


var strm = application.getStream(streamFullName, true);




And similarly in the onUnpublish, it's also using application.getStream(streamFullName).


The problem is when the network drops between the encoder and AMS.  I've modified ExDVRStream to ensure it will always record in append mode.  This should ensure that streams recover gracefully and recording picks up where it left off.  However, there seems to be some kind of race condition because I see onStartRecord() called in the log, followed immediately by onStopRecord().  I am guessing it's calling application.getStream() to clean up the old stream of the same name, and that's why onStopRecord() is being called.


Is there a way to gracefully handle stream dropouts?




More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points