<commit_before>/* Autogenerated with Kurento Idl */

/*
 * (C) Copyright 2013-2015 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the GNU Lesser General Public License (LGPL)
 * version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

var inherits = require('inherits');

var kurentoClient = require('kurento-client');

var checkType      = kurentoClient.checkType;
var ChecktypeError = checkType.ChecktypeError;

var Transaction = kurentoClient.TransactionsManager.Transaction;

var Filter = kurentoClient.register.abstracts.Filter;


function noop(error, result) {
  if (error) console.trace(error);

  return result
};


/**
 * Create a {@link module:crowddetector.CrowdDetectorFilter CrowdDetectorFilter}
 *
 * @classdesc
 *  Filter that detects people agglomeration in video streams
 *
 * @extends module:core/abstracts.Filter
 *
 * @constructor module:crowddetector.CrowdDetectorFilter
 *
 * @fires {@link module:crowddetector#event:CrowdDetectorDirection CrowdDetectorDirection}
 * @fires {@link module:crowddetector#event:CrowdDetectorFluidity CrowdDetectorFluidity}
 * @fires {@link module:crowddetector#event:CrowdDetectorOccupancy CrowdDetectorOccupancy}
 */
function CrowdDetectorFilter(){
  CrowdDetectorFilter.super_.call(this);
};
inherits(CrowdDetectorFilter, Filter);


//
// Public properties
//

/**
 * The processing image will be resized to this width (in pixels)
 *
 * @alias module:crowddetector.CrowdDetectorFilter#getProcessingWidth
 *
 * @param {module:crowddetector.CrowdDetectorFilter~getProcessingWidthCallback} [callback]
 *
 * @return {external:Promise}
 */
CrowdDetectorFilter.prototype.getProcessingWidth = function(callback){
  var transaction = (arguments[0] instanceof Transaction)
                  ? Array.prototype.shift.apply(arguments)
                  : undefined;

  if(!arguments.length) callback = undefined;

  callback = (callback || noop).bind(this)

  return this._invoke(transaction, 'getProcessingWidth', callback);
};
/**
 * @callback module:crowddetector.CrowdDetectorFilter~getProcessingWidthCallback
 * @param {external:Error} error
 * @param {external:Integer} result
 */

/**
 * The processing image will be resized to this width (in pixels)
 *
 * @alias module:crowddetector.CrowdDetectorFilter#setProcessingWidth
 *
 * @param {external:Integer} processingWidth
 * @param {module:crowddetector.CrowdDetectorFilter~setProcessingWidthCallback} [callback]
 *
 * @return {external:Promise}
 */
CrowdDetectorFilter.prototype.setProcessingWidth = function(processingWidth, callback){
  var transaction = (arguments[0] instanceof Transaction)
                  ? Array.prototype.shift.apply(arguments)
                  : undefined;

  checkType('int', 'processingWidth', processingWidth, {required: true});

  var params = {
    processingWidth: processingWidth
  };

  callback = (callback || noop).bind(this)

  return this._invoke(transaction, 'setProcessingWidth', params, callback);
};
/**
 * @callback module:crowddetector.CrowdDetectorFilter~setProcessingWidthCallback
 * @param {external:Error} error
 */


/**
 * @alias module:crowddetector.CrowdDetectorFilter.constructorParams
 *
 * @property {module:core.MediaPipeline} mediaPipeline
 *  the {@link module:core.MediaPipeline MediaPipeline} to which the filter 
 *  belongs
 *
 * @property {module:crowddetector/complexTypes.RegionOfInterest}[] rois
 *  Regions of interest for the filter
 */
CrowdDetectorFilter.constructorParams = {
  mediaPipeline: {
    type: 'MediaPipeline',
    required: true
  },
  rois: {<commit_msg>Generated code from kms-crowddetector 06bb08641cf022c66465360654291b7dcd2ab127<commit_after>/* Autogenerated with Kurento Idl */

/*
 * (C) Copyright 2013-2015 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the GNU Lesser General Public License (LGPL)
 * version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

var inherits = require('inherits');

var kurentoClient = require('kurento-client');

var disguise = kurentoClient.disguise;

var checkType      = kurentoClient.checkType;
var ChecktypeError = checkType.ChecktypeError;


var Transaction = kurentoClient.TransactionsManager.Transaction;

var Filter = kurentoClient.register.abstracts.Filter;


function noop(error, result) {
  if (error) console.trace(error);

  return result
};


/**
 * Create a {@link module:crowddetector.CrowdDetectorFilter CrowdDetectorFilter}
 *
 * @classdesc
 *  Filter that detects people agglomeration in video streams
 *
 * @extends module:core/abstracts.Filter
 *
 * @constructor module:crowddetector.CrowdDetectorFilter
 *
 * @fires {@link module:crowddetector#event:CrowdDetectorDirection CrowdDetectorDirection}
 * @fires {@link module:crowddetector#event:CrowdDetectorFluidity CrowdDetectorFluidity}
 * @fires {@link module:crowddetector#event:CrowdDetectorOccupancy CrowdDetectorOccupancy}
 */
function CrowdDetectorFilter(){
  CrowdDetectorFilter.super_.call(this);
};
inherits(CrowdDetectorFilter, Filter);


//
// Public properties
//

/**
 * The processing image will be resized to this width (in pixels)
 *
 * @alias module:crowddetector.CrowdDetectorFilter#getProcessingWidth
 *
 * @param {module:crowddetector.CrowdDetectorFilter~getProcessingWidthCallback} [callback]
 *
 * @return {external:Promise}
 */
CrowdDetectorFilter.prototype.getProcessingWidth = function(callback){
  var transaction = (arguments[0] instanceof Transaction)
                  ? Array.prototype.shift.apply(arguments)
                  : undefined;

  if(!arguments.length) callback = undefined;

  callback = (callback || noop).bind(this)

  return disguise(this._invoke(transaction, 'getProcessingWidth', callback), this)
};
/**
 * @callback module:crowddetector.CrowdDetectorFilter~getProcessingWidthCallback
 * @param {external:Error} error
 * @param {external:Integer} result
 */

/**
 * The processing image will be resized to this width (in pixels)
 *
 * @alias module:crowddetector.CrowdDetectorFilter#setProcessingWidth
 *
 * @param {external:Integer} processingWidth
 * @param {module:crowddetector.CrowdDetectorFilter~setProcessingWidthCallback} [callback]
 *
 * @return {external:Promise}
 */
CrowdDetectorFilter.prototype.setProcessingWidth = function(processingWidth, callback){
  var transaction = (arguments[0] instanceof Transaction)
                  ? Array.prototype.shift.apply(arguments)
                  : undefined;

  checkType('int', 'processingWidth', processingWidth, {required: true});

  var params = {
    processingWidth: processingWidth
  };

  callback = (callback || noop).bind(this)

  return disguise(this._invoke(transaction, 'setProcessingWidth', params, callback), this)
};
/**
 * @callback module:crowddetector.CrowdDetectorFilter~setProcessingWidthCallback
 * @param {external:Error} error
 */


/**
 * @alias module:crowddetector.CrowdDetectorFilter.constructorParams
 *
 * @property {module:core.MediaPipeline} mediaPipeline
 *  the {@link module:core.MediaPipeline MediaPipeline} to which the filter 
 *  belongs
 *
 * @property {module:crowddetector/complexTypes.RegionOfInterest}[] rois
 *  Regions of interest for the filter
 */
CrowdDetectorFilter.constructorParams = {
  mediaPipeline: {
    type: 'MediaPipeline',
    required: true
  },
  rois: {
{'fraction_non_alphanumeric': 0.10323383084577115, 'fraction_numerical': 0.0070895522388059705, 'mean_word_length': 4.978438661710038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3277771', 'n_tokens_mistral': 2400, 'n_tokens_neox': 2289, 'n_words': 557}