|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.humatic.dsj.DSFilter
de.humatic.dsj.JavaSourceFilter
public class JavaSourceFilter
Custom DSFilter object representing the dsj_JavaSourceFilter which will allow dsj to inject the
results of java drawing commands into a DirectShow filtergraph.
Simply spoken this lets you draw your own wmv or do the Ken Burns effect with your family pics
straight into an WindowsMEdia or avi file from java. The filter has also proven to work with DirectShow compatible
hardware renderers like Blackmagic Decklink boards. That is: it can be used to do film or
on air television graphics in java.
The underlying DirectShow filter is a PushSource, i.e. the first and data originating filter in its filtergraph.
To draw over video originating from another source use the JavaOverlayFilter.
A 32bit version is available upon request.
As of dsj 0_8_4 the filter can also be used for audio and offers various modes of operation, determined by the srcFlags parameter in
DSGraph.createJavaSourceGraph(...) and insertJavaSourceFilter(...). In RUNNING mode java code should submit frames to the filter "in time", i.e.
matching the desired framerate. The filter will generate duplicates or drop frames when data arrives early or late.
In BLOCKING mode, the filter blocks the graph until data has been submitted, so application code can take its
time to generate the next frame. This will however not block forever, but will continue after app. 10 times the normal frametime. The
BLOCK_STRICT flag can be used to enable indefinite blocking, but special care needs to be taken to not create deadlocks upon dispose or
when issueing transport commands to the graph.
CALLBACK is | combineable with all modes and will make the filter send PropertyChangeEvents
of type DSFiltergraph.VIDEO (or AUDIO)_BUFFER_REQUEST when it wants the next frame to be delivered.
Especially when compressing on the fly, the callback way should be used, as the encoding will dynamically alter the rate
the graph is running at.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.humatic.dsj.DSFilter |
|---|
DSFilter.DSPin |
| Field Summary | |
|---|---|
static int |
BLOCK_STRICT
Source flags for use in DSGraph.createJavaSourceGraph(...) |
static int |
BLOCKING
Source flags for use in DSGraph.createJavaSourceGraph(...) |
static int |
CALLBACK
Source flags for use in DSGraph.createJavaSourceGraph(...) |
static int |
RUNNING
Source flags for use in DSGraph.createJavaSourceGraph(...) |
| Fields inherited from class de.humatic.dsj.DSFilter |
|---|
PINDIR_INPUT, PINDIR_OUTPUT |
| Method Summary | |
|---|---|
int |
drawJavaImage(int[] srcCoords)
Do a partial redraw of a frame composited in the Graphics2D as returned from getDrawingSurface(). |
int |
getAudioFrameTime()
Returns milliseconds per audioframe, when set up for audio. |
int |
getBufferSize()
Returns the size (in bytes) of the buffer, that the filter wants to be fed with when set up for audio.. |
java.awt.Graphics2D |
getDrawingSurface()
Returns a Graphics2D Object an application can use to draw into. |
int |
getVideoFrameTime()
Returns milliseconds per videoframe, when set up for video. |
int |
setJavaAudio(byte[] audioData)
Sends audio bytes to the filter. |
int |
setJavaImage()
Send a frame composited in the Graphics2D as returned from getDrawingSurface() to DirectShow. |
int |
setJavaImage(byte[] data)
The filter expects to be fed with 24bit BGR data. |
void |
stop()
|
| Methods inherited from class de.humatic.dsj.DSFilter |
|---|
applyPropPageSettings, closePropPage, connectDownstream, disconnect, dumpConnections, embedPropertiesPage, getCLSID, getFiltergraph, getFilterInfo, getFilterState, getID, getInputs, getName, getOutputs, getPin, getPin, getPin, getPins, getPropPageCount, getPropPageSize, getPropPageTitles, loadFilterState, renderEx, renderPin, saveFilterState, setParameter, showPropertiesDialog, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int RUNNING
public static final int BLOCKING
public static final int CALLBACK
public static final int BLOCK_STRICT
| Method Detail |
|---|
public java.awt.Graphics2D getDrawingSurface()
public int getVideoFrameTime()
public int getBufferSize()
public int getAudioFrameTime()
public void stop()
public int setJavaImage(byte[] data)
public int setJavaImage()
public int drawJavaImage(int[] srcCoords)
public int setJavaAudio(byte[] audioData)
throws DSJException
DSJException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||