Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
var gstreamer = require('gstreamer-superficial');
var pipeline = new gstreamer.Pipeline("videotestsrc ! theoraenc ! oggmux ! appsink max-buffers=1 name=sink");
var clients = [];
var headers;
var appsink = pipeline.findChild("sink");
appsink.pull( function(buf) {
// console.log("BUFFER size",buf.length);
for( c in clients ) {
clients[c].write( buf );
}
}, function(caps) {
// console.log("CAPS",caps);
if( caps.streamheader ) headers = caps.streamheader;
} );