org.gstreamer.elements
Class AppSrc

java.lang.Object
  extended by org.gstreamer.lowlevel.NativeValue
      extended by org.gstreamer.lowlevel.Handle
          extended by org.gstreamer.lowlevel.NativeObject
              extended by org.gstreamer.lowlevel.RefCountedObject
                  extended by org.gstreamer.GObject
                      extended by org.gstreamer.GstObject
                          extended by org.gstreamer.Element
                              extended by org.gstreamer.elements.BaseSrc
                                  extended by org.gstreamer.elements.AppSrc

public class AppSrc
extends BaseSrc

Enables an application to feed buffers into a pipeline.


Nested Class Summary
static interface AppSrc.ENOUGH_DATA
          Signal emitted when this AppSrc has enough data in the queue.
static interface AppSrc.NEED_DATA
          Signal emitted when this AppSrc needs data.
static interface AppSrc.SEEK_DATA
          Signal emitted when this AppSrc when it requires the application to push buffers from a specific location in the input stream.
static class AppSrc.Type
           
 
Nested classes/interfaces inherited from class org.gstreamer.Element
Element.HANDOFF, Element.NO_MORE_PADS, Element.PAD_ADDED, Element.PAD_REMOVED
 
Nested classes/interfaces inherited from class org.gstreamer.GObject
GObject.GCallback
 
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject
NativeObject.Initializer
 
Field Summary
 
Fields inherited from class org.gstreamer.lowlevel.NativeObject
defaultInit, ownsHandle
 
Constructor Summary
AppSrc(NativeObject.Initializer init)
           
 
Method Summary
 void connect(AppSrc.ENOUGH_DATA listener)
          Adds a listener for the enough-data signal
 void connect(AppSrc.NEED_DATA listener)
          Adds a listener for the need-data signal
 void connect(AppSrc.SEEK_DATA listener)
          Adds a listener for the seek-data signal
 void disconnect(AppSrc.ENOUGH_DATA listener)
          Removes a listener for the enough-data signal
 void disconnect(AppSrc.NEED_DATA listener)
          Removes a listener for the need-data signal
 void disconnect(AppSrc.SEEK_DATA listener)
          Removes a listener for the seek-data signal
 void endOfStream()
           
 Caps getCaps()
           
 void getLatency(long[] minmax)
           
 long getMaxBytes()
           
 long getSize()
           
 void pushBuffer(Buffer buffer)
           
 void setCaps(Caps caps)
          Sets the Caps on this Element.
 void setLatency(long min, long max)
           
 void setMaxBytes(long max)
           
 void setSize(long size)
           
 void setStreamType(AppSrc.Type type)
           
 
Methods inherited from class org.gstreamer.elements.BaseSrc
isLive, setFormat, setLive
 
Methods inherited from class org.gstreamer.Element
addPad, connect, connect, connect, connect, disconnect, disconnect, disconnect, disconnect, getBaseTime, getBus, getClock, getFactory, getPad, getPads, getRequestPad, getSinkPads, getSrcPads, getState, getState, getState, getState, getStaticPad, link, link, linkMany, linkPads, linkPadsFiltered, makeRawElement, postMessage, releaseRequestPad, removePad, sendEvent, setState, unlink, unlinkMany, unlinkPads
 
Methods inherited from class org.gstreamer.GstObject
addListenerProxy, getName, initializer, initializer, objectFor, objectFor, ref, removeListenerProxy, setName, steal, toString, unref
 
Methods inherited from class org.gstreamer.GObject
addCallback, connect, connect, connect, disconnect, disconnect, disposeNativeHandle, g_signal_connect, get, getPointer, invalidate, objectFor, removeCallback, set
 
Methods inherited from class org.gstreamer.lowlevel.NativeObject
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, instanceFor, isDisposed, nativeValue, objectFor, objectFor
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppSrc

public AppSrc(NativeObject.Initializer init)
Method Detail

setCaps

public void setCaps(Caps caps)
Description copied from class: Element
Sets the Caps on this Element.

Overrides:
setCaps in class Element
Parameters:
caps - the new Caps to set.

getCaps

public Caps getCaps()

setSize

public void setSize(long size)

getSize

public long getSize()

setStreamType

public void setStreamType(AppSrc.Type type)

setMaxBytes

public void setMaxBytes(long max)

getMaxBytes

public long getMaxBytes()

setLatency

public void setLatency(long min,
                       long max)

getLatency

public void getLatency(long[] minmax)

pushBuffer

public void pushBuffer(Buffer buffer)

endOfStream

public void endOfStream()

connect

public void connect(AppSrc.NEED_DATA listener)
Adds a listener for the need-data signal

Parameters:
listener - Listener to be called when appsrc needs data.

disconnect

public void disconnect(AppSrc.NEED_DATA listener)
Removes a listener for the need-data signal

Parameters:
listener - The listener that was previously added.

connect

public void connect(AppSrc.ENOUGH_DATA listener)
Adds a listener for the enough-data signal

Parameters:
listener - Listener to be called this when appsrc fills its queue.

disconnect

public void disconnect(AppSrc.ENOUGH_DATA listener)
Removes a listener for the enough-data signal

Parameters:
listener - The listener that was previously added.

connect

public void connect(AppSrc.SEEK_DATA listener)
Adds a listener for the seek-data signal

Parameters:
listener - Listener to be called when appsrc when its "stream-mode" property is set to "seekable" or "random-access". The signal argument will contain the new desired position in the stream expressed in the unit set with the "format" property. After receiving the seek-data signal, the application should push-buffers from the new position.

disconnect

public void disconnect(AppSrc.SEEK_DATA listener)
Removes a listener for the seek-data signal

Parameters:
listener - The listener that was previously added.