• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Gracefully resume DVR stream

Community Beginner ,
Jul 30, 2013 Jul 30, 2013

Copy link to clipboard

Copied

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);

strm.publish(client);

strm.onStartRecord();

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?

Thanks

Views

278

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines