Closed ewr closed 11 years ago
Why not just change the metaint
value of the writer after the initial constructor call? The first "passthrough" call will already have been queued at that point in the parser:
var metaint = 8192;
var initial = oldWriter._parserBytesLeft;
var writer = new Writer(initial);
writer.metaint = metaint;
Thanks, but no thanks.
For StreamMachine, I'm working on being able to hand off all connections to a new process to allow seamless restarts. To do that with an Icecast writer, I need a way to tell the new process that it should write less than a full chunk of data before the first meta injection.
I'm grabbing
_parserBytesLeft
from the original icecast writer, and then passing that in to the new one asinitialMetaInt
.