org.gstreamer.elements
Class RGBDataFileSink
java.lang.Object
org.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
- extends Bin
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.
|
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 |
getNumQueuedFrames()
Returns the number of buffers currently stored in the fifo linked list (still
not pushed down the pipeline). |
int |
getQueueSize()
Returns the current size of the AppSrc queue. |
void |
pushRGBFrame(Buffer buf)
Pushes a buffer down the pipeline. |
void |
setQueueSize(int nFrames)
Sets the size of the AppSrc queue. |
void |
start()
Sets the state of the pipeline to PLAYING. |
void |
stop()
Sets the state of the pipeline to PAUSED. |
| Methods inherited from class org.gstreamer.Bin |
add, addMany, connect, connect, debugToDotFile, debugToDotFile, disconnect, disconnect, getElementByInterface, getElementByName, getElementByNameRecurseUp, getElements, getElementsRecursive, getElementsSorted, getSinks, getSources, remove, removeMany |
| 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, setCaps, setState, syncStateWithParent, unlink, unlinkMany, unlinkPads |
| Methods inherited from class org.gstreamer.GstObject |
addListenerProxy, getName, getParent, 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, getPropertyDefaultValue, getPropertyMaximumValue, getPropertyMinimumValue, 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 |
RGBDataFileSink
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)
- Creates a new RGBDataFileSink.
- Parameters:
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.
pushRGBFrame
public void pushRGBFrame(Buffer buf)
- Pushes a buffer down the pipeline.
- Parameters:
buf - The buffer to push. Actually, it is not immediatelly 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.
start
public void start()
- Sets the state of the pipeline to PLAYING.
stop
public void stop()
- Sets the state of the pipeline to PAUSED.
setQueueSize
public void setQueueSize(int nFrames)
- Sets the size of the AppSrc queue.
- Parameters:
nFrames - Size of the queue expressed in number of frames.
getQueueSize
public int getQueueSize()
- Returns the current size of the AppSrc queue.
getNumQueuedFrames
public int getNumQueuedFrames()
- Returns the number of buffers currently stored in the fifo linked list (still
not pushed down the pipeline).
Copyright © 2010. All Rights Reserved.