|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
de.humatic.dsj.DSFiltergraph
public class DSFiltergraph
dsj - DirectShow Java Wrapper,
DSFiltergraph is this package's core class. It constructs a java object that sets up a DirectShow
filtergraph, handles rendering and data delivery to java and allows you to control
the playback of the graph.
DSFiltergraph can not be constructed directly. An application uses one of the subclasses that cover the main areas of
available funcionality:
DSMovie - plays video and audio from files and streams.
DSCapture - lets you work with VfW and WDM capture devices.
DSDVCam - for firewire and USB 2.0 DV camcorders.
DSHDVCam - for firewire mpeg HDV camcorders and D-VHS decks.
DSDvd - for playback of standard DVDs
DSBDAGraph - for digital TV devices that follow the BDA driver standard.
DSStreamBufferGraph - for timeshifted recording from capture devices and BDA receivers.
DSGraph - for lower level access to the native structures
DSFiltergraph provides a number of different rendering modes that determine how the filtergraph's video output
will be integrated into a java GUI. An application specifies these on construction by setting bits in the constructors' flags
parameter: (dsj 0_8_5 introduces some shorter constant names for some modes here. Old ones remain valid)
- native (DirectDraw7) (Constants: DD7 or RENDER_NATIVE) - this is the preferred, all-purpose rendering mode. It uses DirectDraw7
via JAWT to draw into the canvas DSFiltergraph extends and delivers good performance. While the pure native modes
(embedded VMR and overlay) may be stronger performancewise, this mode is fully java integrated and normally
does not cause problems with AWT integration. When working with Swing, be aware, that this mode results in a heavyweight
component.
- native (Direct3D9) (D3D9) - new in dsj 0_8_5 and not fully implemented yet. This is another JAWT based native mode.
Uses newer DirectX API and less CPU than the former when it can work on a capeable GPU. In the moment it is purely a 2D video display,
without any 3D functionality. There is no RendererControls available and the renderer needs to be tested on more hardware
- native (GDI) (NATIVE_FORCE_GDI) - another JAWT based native mode. More cpu intensive and less performant than
the DirectDraw one, but in some jdk versions Java2D may conflict with DirectDraw.
- java side. self redrawing. (J2D or JAVA_AUTODRAW) - dsj pulls data over to java and renders automatically into a
lightweight Swing panel, that you can directly add to your GUI
- java side, polled (JAVA_POLL) - no automatic action. Application code is responsible for retrieving
data from the dll and rendering or otherwise processing it.
- jave side, polled & delivering RGB instead of BGR data (JAVA_POLL_RGB). Use this to adapt to JMF for RTP
transmission
- headless (HEADLESS) - not interfering with DirectShow signal flow at all beside basic control (start, stop,
etc.). This will make standard filtergraphs come up with a native window instead of rendering
into java windows. It is mainly thought for custom use cases. You may have a custom renderer
filter, maybe in hardware, that you want to work with or the like.
- embedded VideoMixingRenderer9 (VMR9 or VMR_EMBED). This embeds a native DirectShow renderer into
the java canvas. It lets you mix a number of video streams plus graphics overlay. Despite the outstanding capabilities
of the VMR9 it may have certain drawbacks at points. see below.
- overlay (VMR7 or OVERLAY). Draws a native overlay into the java window using DirectShow's VideoMixingRenderer7.
High performance, but again may be problematic at points.
- null sink(NULL). This does nothing but sending received frames to digital nirvana. Useful when using the SampleAccessfilter
to pull data from the filtergraph and no rendering is needed at all.
- Enhanced Video Renderer (EVR). Basic support added in dsj 0_8_61. Uses Microsoft's latest video renderer and is only
available on Vista and beyond. Will allow DXVA hardware accellerated decoders to be used.
Modes that use native DirectShow renderer filters are as far out of Java as can go and may not be suitable in all situations.
They both tend to behave differently accross Windows versions and may present problems with proper integration into
java GUIs. For example, while the VMR 9 seems to work nicely on Vista, it is problematic to reparent with WindowsMedia in XP,
The overlay approach on the other hand may lock the entire GUI with capture and streaming graphs (live sources). It is therefore
disabled in DSCapture, but care should be taken when using network sources in DSMovie.
Also the overlay mode will not allow Java listeners to receive events from the display component. If you need mouse and key events,
initialize the graph with the MOUSE_ENABLED (or DVD_MENU_ENABLED) flag set. Events will then be generated and delivered to registered
Mouse / Key listeners. On JRE 1.5 versions below update 10 only mouse button events will be
transferred, because of a JNI handle leak, that becomes severe with motion events (fixed in 1.5_10). Note that this functionality
is not available on 32bit Windows 7.
Both VMR_EMBED and OVERLAY modes are not fully functional until the display component has been added to some kind of container!
As off dsj 0_8_51 you can switch the library into YUV mode by setting the YUV setup flag. This is only valid with DD7, D3D9, J2D
and JAVA_POLL rendering modes and means that no conversion to RGB colorspace will be performed on the native side. this can
improve performance with hd videos (it will probably not make an obvious difference with nonHD stuff) and you can get yuv
image data in java - for example to send it to JMF - by calling getData(). getImage() will return null in this mode.
The DD7 renderer will be able to display most yuv subtypes to encounter. Whether or not the D3D9 renderer will work highly depends on the graphics card.
Most adapters should support D3D9 surfaces for 16 bit yuv types (as YUY2 or UYVY) but 12 bit modes (like YV12) may be problematic.
You should listen for GRAPH_ERROR events when running with this flag as setup errors as well as errors on surface losses (like
when the user logs off) may occur asynchronously and will be reported through PropertyChangeEvents.
The lightweight J2D renderer will not display anything when in YUV mode (but will continously call getData()).
As of dsj_0_8_53 you can also change the usual BGR24 format to ABGR32 bei setting the RGB32 flag. This only makes sense with
sources that deliver 32bit data of course and takes more resources. One possible use case is with MPEG2 decoders that do not
offer 24bit RGB output types and would require a ColorSpaceConverter filter to connect to the dsj_Sink.
All rendering modes not using DirectShow Renderer filters (that is all but HEADLESS, OVERLAY and VMR_EMBED) can call back into
java with timestamped frame notifications. Set the FRAME_CALLBACK flag in the graph constructors.
With the DELIVER_AUDIO bit set, all DSFiltergraph subclasses except DSDVCam will open a second JNI
pipeline to deliver raw audio data to java. Without this flag audio will simply be played on the native side.
All display flags (DD7 / RENDER_NATIVE to GDI) are mutually exclusive, that is: dsj will use the highest set
bit. Flags that are not display related (see below) can be combined with them by using the | operator (exp: DD7 | DELIVER_AUDIO will
run in DirectDraw7 mode and deliver audio bytes to java). Application code should only use the defined flags (we have seen support
requests where people use something like 0xFF80 | JAVA_AUTODRAW and wonder why things don't go the way they want it to).
Higher bits in the flags parameter are at parts used internally, so please stick with the documented ones. Also remember
your school lessons and use the constants and not their numeric values (which may change)!
All DSFiltergraph subclasses by default automatically start the native filtergraph with audio at normal volume (if there is audio).
To prevent autostarting either set the INIT_PAUSED bit in the flags parameter or call pause() right after initialization. To mute
volume initially set the INIT_MUTED bit
Non-rendering related setup flags:
DELIVER_AUDIO,
DVD_MENU_ENABLED (or MOUSE_ENABLED),
INIT_PAUSED,
INIT_MUTED,
NO_SYNC,
FRAME_CALLBACK
To shutdown a filtergraph call dispose(). This will also remove the display component from any container
it was added to. Disposing the native structures when you're done with them is especially important for
graphs that directly talk to hardware drivers (Capture, DV, BDA). While undisposed movie classes may have no worse
side-effects than memory loss, open unreferenced driver instances may lead to completely
unpredictable behaviour, including JVM and system crashes. In c++ there is no garbage
collector automatically cleaning up behind you. dsj will try to keep track of allocated objects and clean them up when
the dll is unloaded, but it is highly recommended that application code uses dispose() on any graph that it no longer
intends to use.
Some more general considerations:
It is recommended to not declare DSFiltergraph subclass instances static.
| Nested Class Summary | |
|---|---|
class |
DSFiltergraph.DSAudioStream
Nested class that wraps the stream of audio bytes dsj delivers when the DELIVER_AUDIO bit is set on construction. |
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
ACTIVATING
DSFiltergraph events |
static int |
ANAMORPHIC
DSFiltergraph rendering & setup flags |
static int |
ASYNC_BUFFER_GET
DSFiltergraph events |
static int |
ASYNC_BUFFER_REQ
DSFiltergraph events |
static int |
AUDIO_BUFFER_REQUEST
DSFiltergraph events |
static int |
BDA
DSFiltergraph types |
static int |
BDA_PRG_CHANGED
DSFiltergraph events |
static int |
BDA_SCAN_PROGRESS
DSFiltergraph events |
static int |
BDA_SCANNED_FREQ
DSFiltergraph events |
static int |
BDA_SIG_REC
DSFiltergraph events |
static int |
BUFFER_COMPLETE
DSFiltergraph events |
static int |
BUFFERING
DSFiltergraph events |
static int |
CALLER
Event delivery thread constants |
static int |
CAP_STATE_CHANGED
DSFiltergraph events |
static int |
CAPTURE
DSFiltergraph types |
static int |
CLOSED
DSFiltergraph events |
static int |
CLOSING
DSFiltergraph events |
static int |
COMP_AUDIO_BUFFER_REQ
DSFiltergraph events |
static int |
COMP_BUFFER_FILLED
DSFiltergraph events |
static int |
COMP_VIDEO_BUFFER_REQ
DSFiltergraph events |
static int |
D3D9
DSFiltergraph rendering & setup flags |
static int |
DD7
DSFiltergraph rendering & setup flags |
static int |
DECKLINK
Extension API identifiers |
static int |
DELIVER_AUDIO
DSFiltergraph rendering & setup flags |
static int |
DES_ERROR
DSFiltergraph events |
static int |
DONE
DSFiltergraph events |
static int |
DV
DSFiltergraph types |
static int |
DV_STATE_CHANGED
DSFiltergraph events |
static int |
DVD
DSFiltergraph types |
static int |
DVD_FORMAT_CHANGED
DSFiltergraph events |
static int |
DVD_MENU_ENABLED
DSFiltergraph rendering & setup flags |
static int |
E_CANT_PUMP_AUDIO
DSFiltergraph errors |
static int |
E_INIT_HEADLESS
DSFiltergraph errors |
static int |
EDITABLE
DSFiltergraph types |
static int |
ENTER_FS
DSFiltergraph events |
static int |
EPG
DSFiltergraph events |
static int |
EVR
DSFiltergraph rendering & setup flags |
static int |
EXIT_FS
DSFiltergraph events |
static int |
EXPORT_DONE
DSFiltergraph events |
static int |
EXPORT_FINISHING
DSFiltergraph events |
static int |
EXPORT_PROGRESS
DSFiltergraph events |
static int |
EXPORT_STARTED
DSFiltergraph events |
static int |
EXT_API_EVENT
DSFiltergraph events |
static int |
FILTER_CHANGED
DSFiltergraph events |
static int |
FORMAT_CHANGED
DSFiltergraph events |
static int |
FRAME_CALLBACK
DSFiltergraph rendering & setup flags |
static int |
FRAME_LOCKED
DSFiltergraph rendering & setup flags |
static int |
FRAME_NOTIFY
DSFiltergraph events |
static int |
GD
Event delivery thread constants |
static int |
GE_DEVICE_CONNECTED
Graph events |
static int |
GE_DEVICE_LOST
Graph events |
static int |
GE_REF_REC_STOPPED
Graph events |
static int |
GRAPH
DSFiltergraph types |
static int |
GRAPH_CHANGED
DSFiltergraph events |
static int |
GRAPH_ERROR
DSFiltergraph events |
static int |
GRAPH_EVENT
DSFiltergraph events |
static int |
HDV
DSFiltergraph types |
static int |
HDV_STATE_CHANGED
DSFiltergraph events |
static int |
HEADLESS
DSFiltergraph rendering & setup flags |
static int |
INDEXER_DONE
DSFiltergraph events |
static int |
INDEXER_STARTED
DSFiltergraph events |
static int |
INIT_MUTED
DSFiltergraph rendering & setup flags |
static int |
INIT_PAUSED
DSFiltergraph rendering & setup flags |
static int |
INITIALIZED
DSFiltergraph events |
static int |
IP_READY
DSFiltergraph events |
static int |
J2D
DSFiltergraph rendering & setup flags |
static int |
JAVA_AUTODRAW
DSFiltergraph rendering & setup flags |
static int |
JAVA_POLL
DSFiltergraph rendering & setup flags |
static int |
JAVA_POLL_RGB
DSFiltergraph rendering & setup flags |
static int |
JAVASOUND
DSFiltergraph rendering & setup flags |
static int |
KEY_EVENT
DSFiltergraph events |
static int |
KF_NOTIFY
DSFiltergraph events |
static int |
LOCK_BUFFER
DSFiltergraph events |
static int |
LOOP
DSFiltergraph events |
static int |
MGD
Extension API identifiers |
static int |
MOUSE_ENABLED
DSFiltergraph rendering & setup flags |
static int |
MOUSE_EVENT
DSFiltergraph events |
static int |
MOVIE
DSFiltergraph types |
static int |
NATIVE_FORCE_GDI
DSFiltergraph rendering & setup flags |
static int |
NIO_UPDATE
DSFiltergraph events |
static int |
NO_AMW
DSFiltergraph rendering & setup flags |
static int |
NO_SYNC
DSFiltergraph rendering & setup flags |
static int |
NULL
DSFiltergraph rendering & setup flags |
static int |
ONESHOT
Event delivery thread constants |
static int |
OVERLAY
DSFiltergraph rendering & setup flags |
static int |
OVERLAY_BUFFER_REQUEST
DSFiltergraph events |
static int |
PLAYLIST_PARSED
DSFiltergraph events |
static int |
PREVIEW
Common flag values |
static int |
RENDER_NATIVE
DSFiltergraph rendering & setup flags |
static int |
RESTART_REQ
DSFiltergraph events |
static int |
RGB32
DSFiltergraph rendering & setup flags |
static int |
RTCP_EVENT
DSFiltergraph events |
static int |
RTMP_EVENT
DSFiltergraph events |
static int |
RTMP_SO_CHANGED
DSFiltergraph events |
static int |
RTMP_STATE_CHANGED
DSFiltergraph events |
static int |
SAMPLE_BUFFER_FILLED
DSFiltergraph events |
static int |
SAVE_DONE
DSFiltergraph events |
static int |
SAVE_STARTED
DSFiltergraph events |
static int |
SBE
DSFiltergraph types |
static int |
SBE_REC_STATE_CHANGED
DSFiltergraph events |
static int |
SERVICE_ERROR
DSFiltergraph events |
static int |
SERVICE_EVENT
DSFiltergraph events |
static int |
SINK_ERROR
DSFiltergraph events |
static int |
SINK_STATE_CHANGED
DSFiltergraph events |
static int |
SIZE_CHANGED
DSFiltergraph events |
static int |
SOURCE_ERROR
DSFiltergraph events |
static int |
SOURCE_STATE_CHANGED
DSFiltergraph events |
static int |
SOURCE_STATE_NOTIFY
DSFiltergraph events |
static int |
SOURCE_USER_DATA
DSFiltergraph events |
static int |
STILL_IMG_RECEIVED
DSFiltergraph events |
static int |
STREAM_SEEK
DSFiltergraph events |
static int |
SUBCLASS_EVENT
DSFiltergraph events |
static int |
SWING
Event delivery thread constants |
static int |
SYNC_BUFFER_REQ
DSFiltergraph events |
static int |
TABLE_RECEIVED
DSFiltergraph events |
static int |
TIME_FORMAT_CHANGED
DSFiltergraph events |
static int |
TRANS_IN_PLACE
DSFiltergraph events |
static int |
TRANSPORT
DSFiltergraph events |
static int |
TS_BUFFER_FILLED
DSFiltergraph events |
int |
type
|
static int |
VIDEO_BUFFER_REQUEST
DSFiltergraph events |
static int |
VMR_EMBED
DSFiltergraph rendering & setup flags |
static int |
VMR7
DSFiltergraph rendering & setup flags |
static int |
VMR9
DSFiltergraph rendering & setup flags |
static int |
VPJ
Extension API identifiers |
static int |
YUV
DSFiltergraph rendering & setup flags |
static int |
YUV_ORG
DSFiltergraph rendering & setup flags |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
DSFiltergraph()
|
|
| Method Summary | |
|---|---|
DSFilter |
addColorSpaceConverter(int mode,
int reserved)
|
DSFilter |
addFilterToGraph(DSFilterInfo info)
Adds a filter to the native filtergraph and creates a DSFilter object representing it. |
void |
addNotify()
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Instead of defining another interface DSFiltergraph uses existing java api and fires PropertyChangeEvents when properties change. |
java.awt.Component |
asComponent()
Depending on rendering mode, returns either the canvas DSFiltergraph extends or a JPanel it renders into |
DSFilter |
connectDump(DSFilter.DSPin toPin,
java.lang.String outputFilePath)
Connects a filter that will write raw data of any type - as received from the given pin - to a file at %outputFilePath. |
int |
connectSink(Sink sink)
Connects the given Sink object to the graph. |
static DSFiltergraph |
createDSFiltergraph(java.lang.String path,
int flags,
java.beans.PropertyChangeListener pcl)
"Factory" method. |
void |
dispose()
Disposes off all native & java structures and is to be seen as a mandatory call when you are done with a Filtergraph. |
void |
dumpGraph(boolean dc)
Prints a listing of filters in the graph (& evtl. |
DSFilter |
findFilterByName(java.lang.String name)
Tries to find a filter of the given name in the graph. |
DSFilter |
findRenderer(int majorType)
Tries to find the renderer for the given major media type (DSMediaType.MT_..). |
int |
flipImage(int flip)
Flips the display and eventually the return of getImage(). |
boolean |
getActive()
Returns the internal state of the graph. |
boolean |
getAspectLocked()
|
int[] |
getAspectRatio()
|
int[] |
getAudioProperties()
Returns sample rate, samplesize and number of channels of a graph's audio stream if any. |
DSFiltergraph.DSAudioStream |
getAudioStream()
Returns the constructed DSAudioStream when set up with DELIVER_AUDIO bit set. |
int |
getBitDepth()
Returns bitDepth of uncompressed data. |
byte[] |
getData()
Returns native uncompressed BGR or RGB image data in a byte array (YUV when the YUV flag(s) have been set). |
int |
getDataSize()
|
java.awt.Dimension |
getDisplaySize()
Returns rendering component's boundary in a java.awt.Dimension object. |
int |
getDuration()
Returns graph duration if known, expressed in milliseconds |
float |
getEffectiveFrameRate()
Returns the effective framerate when the Filtergraph is running |
float |
getFrameRate()
Returns media, capture device or DV tape derived framerate. |
java.awt.Frame |
getFullScreenWindow()
|
long |
getID()
Returns the native memory pointer. |
java.awt.image.BufferedImage |
getImage()
Returns native uncompressed BGR or RGB (ARGB in VMR9 and EVR modes) data in a BufferedImage object backed by a DataBufferByte. |
java.lang.String |
getInfo()
|
boolean |
getLoop()
|
java.awt.Dimension |
getMediaDimension()
Returns original media dimension. |
java.awt.Dimension |
getMinimumSize()
|
int |
getOutFlags()
Returns the flag int passed on construction, with some bits possibly changed. |
float |
getPan()
|
java.awt.Dimension |
getPreferredSize()
|
float |
getRate()
Returns current playback rate. |
RendererControls |
getRendererControls()
Gets the RendererControls object for the renderer this Filtergraph has been constructed with. |
int |
getTime()
Returns current playback position in milliseconds. |
float |
getVolume()
|
int |
getYUVType()
Returns the YUV type of image data as a packed FCC when set up with YUV flag, -1 otherwise. |
void |
goFullScreen(java.awt.GraphicsDevice device,
int flags)
Displays graph in fullscreen mode. |
void |
graphChanged()
|
boolean |
hasMediaOfType(int majorType)
Returns true if the filtergraph has streams of the given major media type (DSMediaType.MT_AUDIO / MT_VIDEO) |
DSFilter |
insertFilter(DSFilter before,
DSFilter after,
DSFilterInfo toInsert)
Tries to insert a filter described by the FilterInfo argument between the two given filters and returns it If the method fails, dsj tries to restore the graph to its previous state. |
JavaOverlayFilter |
insertOverlayFilter(int flags)
Inserts the dsj_JavaOverlayFilter and establishes communication with it. |
DSSampleBuffer |
insertSampleAccessFilter(DSFilter before,
DSFilter.DSPin srcPin,
DSFilter after,
int flags)
Installs an nio.ByteBuffer between the two specified filters from which the application can read - depending on the insertion point - compressed or uncompressed data. |
DSFilter |
insertTransInPlaceFilter(DSFilter before,
DSFilter.DSPin srcPin,
DSFilter after,
JTransInPlaceFilter jtip,
int flags)
Inserts the native part of dsj's TransInPlace filter between the two given filters and establishes communication with the supplied extension of JTransInPlaceFilter whose transform method will then be called from the filtergraph. |
boolean |
isFullScreen()
|
boolean |
isSubGraph()
|
void |
leaveFullScreen()
Closes the fullscreen window. |
DSFilter[] |
listFilters()
Returns all the filters in the filtergraph as DSFilter objects. |
void |
lockAspectRatio(boolean locked)
Enables or disables fixed ratio resize behavior. |
void |
paint(java.awt.Graphics g)
|
void |
pause()
Temporarily pauses the graph |
void |
play()
Runs the graph |
boolean |
queryCapability(int c)
Queries for some IAMSeeking capabilities. |
void |
redraw()
Do not call paint() or repaint() on a natively rendering DSFiltergraph directly. |
void |
register(COMObject co)
|
void |
reloadFilter(DSFilter filter)
Disconnects and removes a filter then reinserts and reconnects it. |
void |
removeFilter(DSFilter filter,
boolean restart)
Removes the given filter from the graph. |
void |
removeNotify()
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
|
boolean |
removeSink()
Removes a connected sink and puts the graph back into its "normal" initial display state. |
void |
setAudioRenderer(DSFilterInfo ar)
Directs audio output from this filtergraph to the given sound device. |
void |
setAviExportOptions(int interleavingMode,
int interleavingFreq,
int audioPreroll,
boolean synced,
int flags)
Sets some (avi) exporting parameters. |
void |
setBounds(int jx,
int jy,
int jw,
int jh)
|
boolean |
setClockSource(DSFilter refClock)
Sets the filter to provide the reference clock for the filtergraph (by default this usually is set to the audio renderer). |
void |
setEvent(java.beans.PropertyChangeEvent event,
int th)
Called by some lower level classes to get events posted to listeners. |
void |
setLoop(boolean looping)
|
void |
setPan(float pan)
Set audio balance (-1.0 left, 1.0 right) |
void |
setPreferredSize(java.awt.Dimension dim)
|
void |
setRate(float rate)
Set the playback rate (-1.0 to 2.0). |
void |
setTimeValue(int time)
Set (movie) position to %time (milliseconds) |
void |
setVolume(float vol)
(1.0 - full volume, 0 silence). |
void |
step(int dir)
Step fwd or bwd (set %dir to 1 or -1). |
void |
stop()
Stops the graph. |
void |
tearDown(DSFilter fromFilter,
boolean removeThatFilter)
Disconnects and removes all filters downstream from %fromFilter, optionally also removing that filter. |
void |
update(java.awt.Graphics g)
|
| Methods inherited from class java.awt.Canvas |
|---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CLOSED
public static final int ACTIVATING
public static final int INITIALIZED
public static final int IP_READY
public static final int TRANSPORT
public static final int DV_STATE_CHANGED
public static final int FORMAT_CHANGED
public static final int CAP_STATE_CHANGED
public static final int EXPORT_PROGRESS
public static final int LOOP
public static final int DONE
public static final int FRAME_NOTIFY
public static final int GRAPH_EVENT
public static final int GRAPH_ERROR
public static final int BDA_SCAN_PROGRESS
public static final int BDA_SCANNED_FREQ
public static final int BDA_SIG_REC
public static final int PLAYLIST_PARSED
public static final int BUFFERING
public static final int BUFFER_COMPLETE
public static final int KF_NOTIFY
public static final int MOUSE_EVENT
public static final int KEY_EVENT
public static final int CLOSING
public static final int HDV_STATE_CHANGED
public static final int SBE_REC_STATE_CHANGED
public static final int ENTER_FS
public static final int EXIT_FS
public static final int NIO_UPDATE
public static final int GRAPH_CHANGED
public static final int FILTER_CHANGED
public static final int SIZE_CHANGED
public static final int DVD_FORMAT_CHANGED
public static final int TIME_FORMAT_CHANGED
public static final int TS_BUFFER_FILLED
public static final int EPG
public static final int BDA_PRG_CHANGED
public static final int SUBCLASS_EVENT
public static final int EXT_API_EVENT
public static final int EXPORT_STARTED
public static final int EXPORT_FINISHING
public static final int EXPORT_DONE
public static final int SAVE_STARTED
public static final int SAVE_DONE
public static final int INDEXER_STARTED
public static final int INDEXER_DONE
public static final int DES_ERROR
public static final int SOURCE_STATE_CHANGED
public static final int SOURCE_USER_DATA
public static final int SOURCE_ERROR
public static final int SOURCE_STATE_NOTIFY
public static final int SINK_STATE_CHANGED
public static final int SINK_ERROR
public static final int RTMP_EVENT
public static final int RTMP_STATE_CHANGED
public static final int RTMP_SO_CHANGED
public static final int RTCP_EVENT
public static final int SERVICE_EVENT
public static final int SERVICE_ERROR
public static final int VIDEO_BUFFER_REQUEST
public static final int OVERLAY_BUFFER_REQUEST
public static final int AUDIO_BUFFER_REQUEST
public static final int COMP_BUFFER_FILLED
public static final int SAMPLE_BUFFER_FILLED
public static final int COMP_VIDEO_BUFFER_REQ
public static final int COMP_AUDIO_BUFFER_REQ
public static final int SYNC_BUFFER_REQ
public static final int ASYNC_BUFFER_REQ
public static final int ASYNC_BUFFER_GET
public static final int STREAM_SEEK
public static final int RESTART_REQ
public static final int TRANS_IN_PLACE
public static final int LOCK_BUFFER
public static final int TABLE_RECEIVED
public static final int STILL_IMG_RECEIVED
public static final int GE_DEVICE_LOST
public static final int GE_DEVICE_CONNECTED
public static final int GE_REF_REC_STOPPED
public static final int MOVIE
public static final int DVD
public static final int GRAPH
public static final int DV
public static final int CAPTURE
public static final int SBE
public static final int BDA
public static final int EDITABLE
public static final int HDV
public static final int RENDER_NATIVE
public static final int DD7
public static final int D3D9
public static final int JAVA_AUTODRAW
public static final int J2D
public static final int JAVA_POLL
public static final int JAVA_POLL_RGB
public static final int HEADLESS
public static final int VMR_EMBED
public static final int VMR9
public static final int OVERLAY
public static final int VMR7
public static final int NATIVE_FORCE_GDI
public static final int NULL
public static final int EVR
public static final int DELIVER_AUDIO
public static final int JAVASOUND
public static final int INIT_PAUSED
public static final int DVD_MENU_ENABLED
public static final int MOUSE_ENABLED
public static final int NO_AMW
public static final int INIT_MUTED
public static final int NO_SYNC
public static final int FRAME_CALLBACK
public static final int YUV
public static final int YUV_ORG
public static final int RGB32
public static final int ANAMORPHIC
public static final int FRAME_LOCKED
public static final int E_INIT_HEADLESS
public static final int E_CANT_PUMP_AUDIO
public static final int PREVIEW
public static final int MGD
public static final int DECKLINK
public static final int VPJ
public static final int GD
public static final int CALLER
public static final int SWING
public static final int ONESHOT
public int type
| Constructor Detail |
|---|
public DSFiltergraph()
| Method Detail |
|---|
public static DSFiltergraph createDSFiltergraph(java.lang.String path,
int flags,
java.beans.PropertyChangeListener pcl)
throws DSJException
DSJExceptionpublic long getID()
public java.awt.image.BufferedImage getImage()
throws DSJException
DSJExceptionpublic byte[] getData()
public void play()
public void stop()
throws DSJException
DSJExceptionpublic void pause()
public void setRate(float rate)
throws DSJException
DSJException
public void setTimeValue(int time)
throws DSJException
DSJException
public int getTime()
throws DSJException
DSJException
public float getRate()
throws DSJException
DSJException
public void step(int dir)
throws DSJException
DSJException
public void setLoop(boolean looping)
throws DSJException
DSJExceptionpublic boolean getLoop()
public java.awt.Dimension getMediaDimension()
public java.awt.Dimension getDisplaySize()
public void setBounds(int jx,
int jy,
int jw,
int jh)
throws DSJException
setBounds in class java.awt.ComponentDSJException
public void addNotify()
throws DSJException
addNotify in class java.awt.CanvasDSJExceptionpublic void removeNotify()
removeNotify in class java.awt.Componentpublic int getYUVType()
public java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Componentpublic void setPreferredSize(java.awt.Dimension dim)
setPreferredSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic int getBitDepth()
public int getDataSize()
public int getDuration()
public float getFrameRate()
throws DSJException
DSJException
public float getEffectiveFrameRate()
throws DSJException
DSJException
public void setVolume(float vol)
throws DSJException
DSJException
public float getVolume()
throws DSJException
DSJException
public void setPan(float pan)
throws DSJException
DSJException
public float getPan()
throws DSJException
DSJExceptionpublic boolean queryCapability(int c)
public void dispose()
public void register(COMObject co)
public void goFullScreen(java.awt.GraphicsDevice device,
int flags)
public void leaveFullScreen()
public java.awt.Frame getFullScreenWindow()
public void dumpGraph(boolean dc)
public DSFilter[] listFilters()
throws DSJException
DSJException
public DSFilter addFilterToGraph(DSFilterInfo info)
throws DSJException
DSJException
public DSFilter findFilterByName(java.lang.String name)
throws DSJException
DSJExceptionpublic DSFilter findRenderer(int majorType)
public void tearDown(DSFilter fromFilter,
boolean removeThatFilter)
throws DSJException
DSJException
public void removeFilter(DSFilter filter,
boolean restart)
throws DSJException
DSJException
public void reloadFilter(DSFilter filter)
throws DSJException
DSJException
public DSFilter insertFilter(DSFilter before,
DSFilter after,
DSFilterInfo toInsert)
throws java.lang.IllegalArgumentException,
DSJException
java.lang.IllegalArgumentException
DSJException
public void setAudioRenderer(DSFilterInfo ar)
throws DSJException
DSJException
public JavaOverlayFilter insertOverlayFilter(int flags)
throws DSJException
DSJException
public boolean setClockSource(DSFilter refClock)
throws DSJException
DSJException
public DSSampleBuffer insertSampleAccessFilter(DSFilter before,
DSFilter.DSPin srcPin,
DSFilter after,
int flags)
public DSFilter insertTransInPlaceFilter(DSFilter before,
DSFilter.DSPin srcPin,
DSFilter after,
JTransInPlaceFilter jtip,
int flags)
throws DSJException
DSJException
public DSFilter connectDump(DSFilter.DSPin toPin,
java.lang.String outputFilePath)
throws DSJException
DSJException
public DSFilter addColorSpaceConverter(int mode,
int reserved)
public int getOutFlags()
public java.lang.String getInfo()
public java.awt.Component asComponent()
public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
addPropertyChangeListener in class java.awt.Componentpublic void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
removePropertyChangeListener in class java.awt.Componentpublic void lockAspectRatio(boolean locked)
public boolean getAspectLocked()
public int[] getAspectRatio()
public int flipImage(int flip)
public void graphChanged()
public DSFiltergraph.DSAudioStream getAudioStream()
public boolean getActive()
public RendererControls getRendererControls()
throws DSJException
DSJException
public int connectSink(Sink sink)
throws DSJException
DSJException
public boolean removeSink()
throws DSJException
DSJException
public void setAviExportOptions(int interleavingMode,
int interleavingFreq,
int audioPreroll,
boolean synced,
int flags)
public boolean isSubGraph()
public boolean hasMediaOfType(int majorType)
public boolean isFullScreen()
public int[] getAudioProperties()
public void setEvent(java.beans.PropertyChangeEvent event,
int th)
public void update(java.awt.Graphics g)
update in class java.awt.Canvaspublic void redraw()
public void paint(java.awt.Graphics g)
paint in class java.awt.Canvas
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||