3 Replies Latest reply: Aug 1, 2011 8:25 AM by captfoss RSS

    Flushing the captured data uppon system failure

    775480
      I'm creating a JMF application and saving the captured data to a datasink. During the recording the file output keeps increasing with the data being stuffed in it. However when some faillure occurs, like an energy power problem the file still plays but it's speed is slow and without audio, like if not all the data has been flushed yet. I need to know how to flush the data so that uppon the power faillure the file is complete until that point. Where do I start ?
      Thank you !
        • 1. Re: Flushing the captured data uppon system failure
          EJP
          That's basically a contradiction in terms, isn't it? The corruption or incompleteness of the file is caused by the power failure. If the power fails there is no power to do this magical flush with. Unless you have a UPS and you're attached to its PF signal somehow.
          • 2. Re: Flushing the captured data uppon system failure
            775480
            Hi EJP, thanks for replying
            Indeed may be impossible to recover everything but maybe some mecanism to make save points at regular times, to in case of a power failure, recover at least until that point. Isn't there possible to do seamlessly to the user? Thank you !
            • 3. Re: Flushing the captured data uppon system failure
              captfoss
              Lupan wrote:
              Hi EJP, thanks for replying
              Indeed may be impossible to recover everything but maybe some mecanism to make save points at regular times, to in case of a power failure, recover at least until that point. Isn't there possible to do seamlessly to the user? Thank you !
              Isn't it possible to refuel my car without my noticing?

              No, because you have to shut down the engine and park the car while you put gas in.

              It takes some time to finalize a file when you're doing writing it. It takes some time to get the stream ready to record again after you've stopped it. You can automate the process so the user doesn't have to do anything, but I think you'd have to play around with a bunch of stuff before you could even approach doing it without losing data.