org.kurento.client.HttpPostEndpoint Maven / Gradle / Ivy
Show all versions of kurento-client Show documentation
/**
* This file is generated with Kurento-maven-plugin.
* Please don't edit.
*/
package org.kurento.client;
/**
*
* 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 ` are accessed through the HTTP POST method.
*
**/
@org.kurento.client.internal.RemoteClass
public interface HttpPostEndpoint extends HttpEndpoint {
/**
* Add a {@link EventListener} for event {@link EndOfStreamEvent}. Synchronous call.
*
* @param listener Listener to be called on EndOfStreamEvent
* @return ListenerSubscription for the given Listener
*
**/
@org.kurento.client.internal.server.EventSubscription(EndOfStreamEvent.class)
ListenerSubscription addEndOfStreamListener(EventListener listener);
/**
* Add a {@link EventListener} for event {@link EndOfStreamEvent}. Asynchronous call.
* Calls Continuation<ListenerSubscription> when it has been added.
*
* @param listener Listener to be called on EndOfStreamEvent
* @param cont Continuation to be called when the listener is registered
*
**/
@org.kurento.client.internal.server.EventSubscription(EndOfStreamEvent.class)
void addEndOfStreamListener(EventListener listener, Continuation cont);
/**
* Remove a {@link ListenerSubscription} for event {@link EndOfStreamEvent}. Synchronous call.
*
* @param listenerSubscription Listener subscription to be removed
*
**/
@org.kurento.client.internal.server.EventSubscription(EndOfStreamEvent.class)
void removeEndOfStreamListener(ListenerSubscription listenerSubscription);
/**
* Remove a {@link ListenerSubscription} for event {@link EndOfStreamEvent}. Asynchronous call.
* Calls Continuation<Void> when it has been removed.
*
* @param listenerSubscription Listener subscription to be removed
* @param cont Continuation to be called when the listener is removed
*
**/
@org.kurento.client.internal.server.EventSubscription(EndOfStreamEvent.class)
void removeEndOfStreamListener(ListenerSubscription listenerSubscription, Continuation cont);
public class Builder extends AbstractBuilder {
/**
*
* Creates a Builder for HttpPostEndpoint
*
**/
public Builder(org.kurento.client.MediaPipeline mediaPipeline){
super(HttpPostEndpoint.class,mediaPipeline);
props.add("mediaPipeline",mediaPipeline);
}
public Builder withProperties(Properties properties) {
return (Builder)super.withProperties(properties);
}
public Builder with(String name, Object value) {
return (Builder)super.with(name, value);
}
/**
*
* Sets a value for disconnectionTimeout in Builder for HttpPostEndpoint.
*
* @param disconnectionTimeout
* This is the time that an http endpoint will wait for a reconnection, in case an HTTP connection is lost.
*
**/
public Builder withDisconnectionTimeout(int disconnectionTimeout){
props.add("disconnectionTimeout",disconnectionTimeout);
return this;
}
/**
*
* Feed the input media as-is to the Media Pipeline, instead of first decoding it.
*
* When this property is not enabled, the input media gets always decoded into a raw format before being processed by the rest of the Media Pipeline; this is done to ensure that Kurento is able to keep track of lost keyframes among other quality-control measurements. Of course, having to decode the media has a cost in terms of CPU usage, but ensures that the output streaming will be robust and reliable.
*
*
* When this property is enabled, the explained behavior gets disabled. Instead, The endpoint will provide any input media directly to the Media Pipeline, without prior decoding. Enabling this mode of operation could have a severe effect on stability, because lost video keyframes will not be regenerated; however, avoiding a full cycle of decoding and encoding can be very useful for certain applications, because it improves performance by greatly reducing the CPU processing load.
*
*
* Keep in mind that if this property is enabled, the original source media MUST already have an encoding format which is compatible with the destination target. For example: given a pipeline which uses this endpoint to read a file and then streams it to a WebRTC browser such as Chrome, then the file must already be encoded with a VP8 or H.264 codec profile which Chrome is able to decode. Note that for this example, most browsers don't support ANY combination of H.264 encoding options; instead, they tend to support only a very specific subset of the codec features (also known as 'profiles').
*
*
* We strongly recommend to avoid using this option, because correct behavior cannot be guaranteed.
*
*
*
**/
public Builder useEncodedMedia(){
props.add("useEncodedMedia",Boolean.TRUE);
return this;
}
}
}