livecam.js
function(tcp_addr, tcp_port) {
    Assert.ok(typeof(tcp_addr), 'string');
    Assert.ok(typeof(tcp_port), 'number');

    const cam_pipeline = gst_video_src + ' ! jpegenc ! multipartmux  boundary="' +
      gst_multipart_boundary + '" ! tcpserversink host=' + tcp_addr + ' port=' + tcp_port;

    var gst_launch = new GstLaunch();

    if (gst_launch.isAvailable()) {
      console.log('GstLaunch found: ' + gst_launch.getPath());
      console.log('GStreamer version: ' + gst_launch.getVersion());
      console.log('GStreamer pipeline: ' + cam_pipeline);

      return gst_launch.spawnPipeline(cam_pipeline);
    } else {
      throw new Error('GstLaunch not found.');
    }
  }
function(tcp_addr, tcp_port) {
    Assert.ok(typeof(tcp_addr), 'string');
    Assert.ok(typeof(tcp_port), 'number');

    const cam_pipeline = gst_video_src + ' ! jpegenc ! multipartmux  boundary="' +
      gst_multipart_boundary + '" ! tcpserversink host=' + tcp_addr + ' port=' + tcp_port;

    var gst_launch = new GstLaunch();

    if (gst_launch.isAvailable()) {
      console.log('GstLaunch found: ' + gst_launch.getPath());
      console.log('GStreamer version: ' + gst_launch.getVersion());
      console.log('GStreamer pipeline: ' + cam_pipeline);

      return gst_launch.spawnPipeline(cam_pipeline);
    } else {
      throw new Error('GstLaunch not found.');
    }
  }
/*!
@fn start
@brief Starts a GStreamer pipeline that broadcasts the default
webcam over the given TCP address and port.
@return A Node <child-process> of the launched pipeline