/* Autogenerated with Kurento Idl */
/*
* (C) Copyright 2013-2015 Kurento (http://kurento.org/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var inherits = require('inherits');
var kurentoClient = require('kurento-client');
var disguise = kurentoClient.disguise;
var ChecktypeError = kurentoClient.checkType.ChecktypeError;
var HttpEndpoint = require('./abstracts/HttpEndpoint');
/**
* Builder for the {@link module:elements.HttpPostEndpoint HttpPostEndpoint}.
*
* @classdesc
* An {@link module:elements.HttpPostEndpoint HttpPostEndpoint} contains SINK
* pads for AUDIO and VIDEO, which provide access to an HTTP file upload
* function
* This type of endpoint provide unidirectional communications. Its
* :rom:cls:`MediaSources <MediaSource>` are accessed through the <a
* href="http://www.kurento.org/docs/current/glossary.html#term-http">HTTP</a>
*
* @extends module:elements/abstracts.HttpEndpoint
*
* @constructor module:elements.HttpPostEndpoint
*
* @fires {@link module:elements#event:EndOfStream EndOfStream}
*/
function HttpPostEndpoint(){
HttpPostEndpoint.super_.call(this);
};
inherits(HttpPostEndpoint, HttpEndpoint);
/**
* @alias module:elements.HttpPostEndpoint.constructorParams
*
* @property {external:Integer} [disconnectionTimeout]
* This is the time that an http endpoint will wait for a reconnection, in case
*
* @property {module:core.MediaPipeline} mediaPipeline
* the {@link module:core.MediaPipeline MediaPipeline} to which the endpoint
* belongs
*
* @property {external:Boolean} [useEncodedMedia]
* configures the endpoint to use encoded media instead of raw media. If the
* parameter is not set then the element uses raw media. Changing this
* parameter could affect in a severe way to stability because key frames lost
* will not be generated. Changing the media type does not affect to the result
*/
HttpPostEndpoint.constructorParams = {
disconnectionTimeout: {
type: 'int' },
mediaPipeline: {
type: 'kurento.MediaPipeline',
required: true
},
useEncodedMedia: {
type: 'boolean' }
};
/**
* @alias module:elements.HttpPostEndpoint.events
*
* @extends module:elements/abstracts.HttpEndpoint.events
*/
HttpPostEndpoint.events = HttpEndpoint.events.concat(['EndOfStream']);
/**
* Checker for {@link module:elements.HttpPostEndpoint}
*
* @memberof module:elements
*
* @param {external:String} key
* @param {module:elements.HttpPostEndpoint} value
*/
function checkHttpPostEndpoint(key, value)
{
if(!(value instanceof HttpPostEndpoint))
throw ChecktypeError(key, HttpPostEndpoint, value);
};
module.exports = HttpPostEndpoint;
HttpPostEndpoint.check = checkHttpPostEndpoint;