Skip to content
Sergey Radionov edited this page Jun 13, 2018 · 4 revisions

Initialization

var wc = require("wcjs-gs");
var player = new wc.JsPlayer();

Player

States:

  • GST_STATE_VOID_PENDING
  • GST_STATE_NULL
  • GST_STATE_READY
  • GST_STATE_PAUSED
  • GST_STATE_PLAYING
AppSink event types:
  • AppSinkSetup
  • AppSinkNewPreroll
  • AppSinkNewSample
  • AppSinkEos
AppSinkCallbacks:
  • for AppSinkSetup = function(AppSinkSetup, pixelFormatName, width, height, pixelFormat)
  • for AppSinkNewPreroll, AppSinkNewSample = function(eventType, frame)
  • for AppSinkEos = function(AppSinkEos)
Methods:
  • parseLaunch(pipelineDescription)
  • addAppSinkCallback(appSinkName, appSinkCallback)
  • setState(state)

VideoFrame

Read only properties:

  • pixelFormatName
  • pixelFormat
  • width
  • height
  • planes: returns Array of planes offsets.
Clone this wiki locally