|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.GObject
org.gstreamer.GstObject
org.gstreamer.Element
org.gstreamer.Bin
org.gstreamer.elements.RGBDataFileSink
public class RGBDataFileSink
This bin encapsulates a pipeline that allows to encode RGB buffers into a video file. It uses the AppSrc element to inject the buffers into the gst pipeline.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gstreamer.Bin |
---|
Bin.DO_LATENCY, Bin.ELEMENT_ADDED, Bin.ELEMENT_REMOVED |
Nested classes/interfaces inherited from class org.gstreamer.Element |
---|
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.Bin |
---|
DEBUG_GRAPH_SHOW_ALL, DEBUG_GRAPH_SHOW_CAPS_DETAILS, DEBUG_GRAPH_SHOW_MEDIA_TYPE, DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS, DEBUG_GRAPH_SHOW_STATES |
Fields inherited from class org.gstreamer.lowlevel.NativeObject |
---|
defaultInit, ownsHandle |
Constructor Summary | |
---|---|
RGBDataFileSink(java.lang.String name,
int width,
int height,
int fps,
java.lang.String encoderStr,
java.lang.String[] encoderPropertyNames,
java.lang.Object[] encoderPropertyData,
java.lang.String muxerStr,
java.io.File file)
Creates a new RGBDataFileSink. |
Method Summary | |
---|---|
int |
getNumDroppedFrames()
Returns the number of dropped frames until now. |
int |
getNumQueuedFrames()
Returns the number of frames currently stored in pre-encoding queue, still not sent to the encoding pipeline. |
int |
getPreQueueSize()
Returns the size of the pre-encoding queue. |
int |
getSrcQueueSize()
Returns the current size of the AppSrc queue. |
void |
pushRGBFrame(Buffer buf)
Pushes a buffer down the pipeline. |
void |
setPreQueueSize(int nFrames)
Sets the size of the pre-encoding queue, which is stored on the Java side. |
void |
setSrcQueueSize(int nFrames)
Sets the size of the AppSrc queue. |
StateChangeReturn |
start()
Sets the state of the pipeline to PLAYING. |
StateChangeReturn |
stop()
Sets the state of the pipeline to NULL and closes the stream. |
Methods inherited from class org.gstreamer.Bin |
---|
add, addMany, connect, connect, connect, debugToDotFile, debugToDotFile, disconnect, disconnect, disconnect, getElementByInterface, getElementByName, getElementByNameRecurseUp, getElements, getElementsRecursive, getElementsSorted, getSinks, getSources, launch, remove, removeMany |
Methods inherited from class org.gstreamer.Element |
---|
addPad, connect, connect, connect, disconnect, disconnect, disconnect, getBaseTime, getBus, getClock, getFactory, getPad, getPads, getRequestPad, getSinkPads, getSrcPads, getStartTime, getState, getState, getState, getState, getStaticPad, isPlaying, link, link, linkMany, linkPads, linkPadsFiltered, makeRawElement, pause, play, postMessage, ready, releaseRequestPad, removePad, sendEvent, setBaseTime, setCaps, setLockedState, setStartTime, setState, syncStateWithParent, unlink, unlinkMany, unlinkPads |
Methods inherited from class org.gstreamer.GstObject |
---|
addListenerProxy, getName, getParent, initializer, initializer, ref, removeListenerProxy, setName, steal, toString, unref |
Methods inherited from class org.gstreamer.GObject |
---|
addCallback, connect, connect, connect, disconnect, disconnect, disposeNativeHandle, emit, emit, g_signal_connect, get, getPointer, getPropertyDefaultValue, getPropertyMaximumValue, getPropertyMinimumValue, getType, 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, objectFor |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RGBDataFileSink(java.lang.String name, int width, int height, int fps, java.lang.String encoderStr, java.lang.String[] encoderPropertyNames, java.lang.Object[] encoderPropertyData, java.lang.String muxerStr, java.io.File file)
name
- The name used to identify this RGBDataFileSink.width
- The width of the buffers that will be sent.height
- The height of the buffers that will be sent.fps
- The framerate with which the buffers should be saved to file.encoderStr
- The name of the encoder to use.encoderPropertyNames
- Array of property names for the encoder.encoderPropertyData
- Array of property values for the encoder.muxerStr
- The name of the muxer to usefile
- Output file where the stream is saved to.Method Detail |
---|
public void pushRGBFrame(Buffer buf)
buf
- The buffer to push. Actually, it is not immediately pushed into
the gst pipeline, but it is added to a fifo linked list that holds the buffer
temporarily until the AppSrc requests more data for its internal queue.public StateChangeReturn start()
public StateChangeReturn stop()
stop
in class Element
public void setPreQueueSize(int nFrames)
nFrames
- Size of the buffer expressed in number of frames.public int getPreQueueSize()
public int getNumQueuedFrames()
public void setSrcQueueSize(int nFrames)
nFrames
- Size of the queue expressed in number of frames.public int getSrcQueueSize()
public int getNumDroppedFrames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |