|
||||||||||
| 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
de.humatic.dsj.DSMovie
public class DSMovie
DSMovie plays DirectShow compatible audio & video media from files and streams and provides encodeing and editing functionality.
| Nested Class Summary | |
|---|---|
static class |
DSMovie.MovieSelection
MovieSelection is a struct, that contains information needed by an editable DSMovie to access a certain portion of data from a given file. |
| Nested classes/interfaces inherited from class de.humatic.dsj.DSFiltergraph |
|---|
DSFiltergraph.DSAudioStream |
| 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 |
DES_SRE
|
static int |
INIT_EDITABLE
|
static int |
SC_NO_TIMEOUT
|
static int |
SC_SEEK_KF
|
static int |
TIME_FORMAT_FRAMES
|
static int |
TIME_FORMAT_MSEC
|
| 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 | |
|---|---|
DSMovie(java.lang.String path,
int flags,
DSFilterInfo videoDecoder,
DSFilterInfo audioDecoder,
java.beans.PropertyChangeListener pcl)
Creates a movie object from common media files and urls using the given video and audio decoders. |
|
DSMovie(java.lang.String path,
int flags,
java.beans.PropertyChangeListener pcl)
Creates a movie object from common media files and urls. |
|
| Method Summary | |
|---|---|
void |
add(DSMovie.MovieSelection ms)
Adds the data referenced by the MovieSelection argument to this movie at its current time. |
void |
cancelExport()
Cancels an ongoing export operation and restores the original playback state of the graph. |
void |
clear()
Removes the current selection and keeps the resulting gap. |
DSMovie.MovieSelection |
copy()
Returns the currently selected part of the movie as a MovieSelection object. |
static DSMovie.MovieSelection |
copyToClipboard(java.lang.String fileName,
int in,
int out)
Places the data between %in and %out of the specified Movie file on the clipboard for use in paste and replace operations without opening the file before. |
void |
createBackground(int from,
int to,
int ARGB,
int width,
int height)
Creates a solid colored background video track. |
static DSMovie |
createEmptyMovie(DSMediaType videoType,
DSMediaType audioType,
java.beans.PropertyChangeListener pcl)
Creates an empty editable movie with basic characteristics as described by the DSMediaType parameters (framerate, bit depth, width & height should be specified for video, the audio type does not need to be further specified, but it should be present or no audio group will be created). |
void |
cut()
Removes the current selection and closes the resulting gap. |
int |
export(java.lang.String fileName,
DSFilterInfo videoEncoder,
DSFilterInfo audioEncoder)
Performs transcoding. |
java.lang.String |
getAsXML()
Returns the xml representation of an editable movie's timeline. |
java.lang.String |
getAudioCodec()
Returns the FourCC for an AVI's audiocodec or a String representation of non AVI encodings |
java.lang.String[][] |
getChapters()
Reads chapters from mp4, mov and matroska files. |
java.lang.String |
getCurrentFile()
|
boolean |
getEditable()
|
MovieTrack |
getIndTrack(int trackIndex)
Returns the MovieTrack at the 0 based index. |
MovieTrack |
getIndTrackType(int mediaType,
int index)
Returns the nth MovieTrack with the given mediatype (0 based index) or null if there is no such track at the given index. |
java.lang.String |
getInfo()
Returns general info retrieved from a movie. |
float |
getMasterFrameRate()
Returns an editable movie's global timeline framerate, which is originally set by the movie, that has been made editable. |
java.lang.String[][] |
getMetaData()
Reads MetaData from the file in use. |
boolean |
getPlaySelection()
|
boolean |
getRecueOnStop()
|
boolean |
getRerendering()
|
int |
getSelectionEnd()
|
int |
getSelectionStart()
|
DSMediaType[] |
getSourceMediaTypes()
|
int |
getStreamType_int()
|
java.lang.String |
getStreamType()
Returns info on a movie's basic stream type, i.e.: AVI, MPEG2_Program etc. |
java.awt.image.BufferedImage |
getThumbnail(int msec,
int iw)
Returns a thumbnail for the given time with the given width and height according to the original aspect ratio. |
int |
getTimeFormat()
|
MovieTrack |
getTrack(int trackID)
Returns the MovieTrack with the given ID. |
int |
getTrackCount()
Returns total number of tracks |
int |
getTrackCount(int mediaType)
Returns the number of tracks with the given media type (DSMediaType.MT_VIDEO or MT_AUDIO). |
java.lang.String |
getVideoCodec()
Returns the FourCC for an AVI's videocodec or a String representation of non AVI encodings |
int |
loadFile(java.lang.String path)
Deprecated. method. Use loadFile(String, int) instead. This old implementation now calls loadFile(path,-1) and will not set the playback position after loading the new file.. |
int |
loadFile(java.lang.String path,
int restartAt)
Loads a new movie into an existing DSMovie graph and starts playback at %restartAt (if that is > 0). |
static void |
mux(java.lang.String inputPath1,
java.lang.String inputPath2,
int[] times,
java.lang.String outputPath)
Muxes the mediafiles referred to by inputPath 1 & 2 into a combined avi file. |
void |
paste(DSMovie.MovieSelection ms)
Pastes the data referenced by the MovieSelection argument into this movie at its current time. |
void |
removeTrack(MovieTrack track)
Removes the given track from an editable movie's timeline. |
void |
replace(DSMovie.MovieSelection ms)
Replaces the current selection with the data referenced by the MovieSelection argument. |
boolean |
rewriteASFIndex()
Reindexes an opened asf file. |
void |
saveAs(java.lang.String newPath,
boolean reopen)
Saves the current editing state to a file at %newPath and eventually opens the targetfile on return. The movie must be editable. To save an xml representation of the editing session, specify an .xtl ending. Output file and compression considerations for avi, asf a.o. |
void |
setEditable(boolean enabled)
Rebuilds the native filtergraph to enable basic editing functions. |
void |
setMasterFrameRate(float rate)
Sets the timeline's global framerate in an editable movie. |
void |
setMasterVolume(float vol)
|
void |
setPlaySelection(boolean playSelectionOnly)
Toggles wether only a selected part of a movie or the entire file will be played . |
void |
setRecueOnStop(boolean recue)
Sets Movie behaviour on stop time (either eof or end of selected segment): if true (default) DSMovie will reposition to the beginning (or start of selected segment). |
void |
setRerendering(boolean immediateRerender)
Controls if the native implementation immediately rerenders the timeline after an editing operation. |
void |
setSelection(int in,
int out)
Sets the "active segment" in a movie. |
void |
setTimeFormat(int format)
|
static void |
streamCopy(java.lang.String input,
java.lang.String output,
DSFilterInfo splitter,
DSFilterInfo muxer,
int msec_in,
int msec_out,
int flags)
Copies the portion between in and out times in a moviefile at %input into a new file without recompression and without requiring an editable movie. This is in first hand made for avi, wav & mp3 files. |
void |
trim()
Trims the movie to the current selection, i.e.: everything before selectionStart and after selectionEnd will be discarded. |
| 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 INIT_EDITABLE
public static final int DES_SRE
public static final int TIME_FORMAT_MSEC
public static final int TIME_FORMAT_FRAMES
public static final int SC_SEEK_KF
public static final int SC_NO_TIMEOUT
| Constructor Detail |
|---|
public DSMovie(java.lang.String path,
int flags,
java.beans.PropertyChangeListener pcl)
throws DSJException
DSJException
public DSMovie(java.lang.String path,
int flags,
DSFilterInfo videoDecoder,
DSFilterInfo audioDecoder,
java.beans.PropertyChangeListener pcl)
throws DSJException
DSJException| Method Detail |
|---|
public java.lang.String getCurrentFile()
public int loadFile(java.lang.String path,
int restartAt)
throws DSJException
DSJException
public int loadFile(java.lang.String path)
throws DSJException
DSJException
public void setSelection(int in,
int out)
throws DSJException
DSJExceptionpublic int getSelectionStart()
public int getSelectionEnd()
public void setPlaySelection(boolean playSelectionOnly)
throws DSJException
DSJExceptionpublic boolean getPlaySelection()
public void setRecueOnStop(boolean recue)
throws DSJException
DSJExceptionpublic boolean getRecueOnStop()
public void setTimeFormat(int format)
public int getTimeFormat()
public java.awt.image.BufferedImage getThumbnail(int msec,
int iw)
public void setEditable(boolean enabled)
throws DSJException
DSJExceptionpublic boolean getEditable()
public DSMediaType[] getSourceMediaTypes()
public java.lang.String getVideoCodec()
throws DSJException
DSJException
public java.lang.String getStreamType()
throws DSJException
DSJExceptionpublic int getStreamType_int()
public java.lang.String getAudioCodec()
throws DSJException
DSJExceptionpublic java.lang.String getInfo()
getInfo in class DSFiltergraphpublic java.lang.String[][] getMetaData()
public java.lang.String[][] getChapters()
public int export(java.lang.String fileName,
DSFilterInfo videoEncoder,
DSFilterInfo audioEncoder)
throws DSJException
DSJException
public void cancelExport()
throws DSJException
DSJException
public static void streamCopy(java.lang.String input,
java.lang.String output,
DSFilterInfo splitter,
DSFilterInfo muxer,
int msec_in,
int msec_out,
int flags)
public int getTrackCount()
throws DSJException
DSJException
public int getTrackCount(int mediaType)
throws DSJException
DSJException
public MovieTrack getIndTrack(int trackIndex)
throws DSJException
DSJException
public MovieTrack getTrack(int trackID)
throws DSJException
DSJException
public MovieTrack getIndTrackType(int mediaType,
int index)
throws DSJException
DSJException
public void createBackground(int from,
int to,
int ARGB,
int width,
int height)
throws DSJException
DSJException
public static DSMovie createEmptyMovie(DSMediaType videoType,
DSMediaType audioType,
java.beans.PropertyChangeListener pcl)
public void setMasterVolume(float vol)
throws DSJException
DSJException
public DSMovie.MovieSelection copy()
throws DSJException
DSJException
public static DSMovie.MovieSelection copyToClipboard(java.lang.String fileName,
int in,
int out)
throws DSJException
DSJException
public void paste(DSMovie.MovieSelection ms)
throws DSJException
DSJException
public void add(DSMovie.MovieSelection ms)
throws DSJException
DSJException
public void cut()
throws DSJException
DSJException
public void clear()
throws DSJException
DSJExceptionpublic void replace(DSMovie.MovieSelection ms)
public void trim()
throws DSJException
DSJException
public void removeTrack(MovieTrack track)
throws DSJException
DSJException
public void setRerendering(boolean immediateRerender)
throws DSJException
DSJExceptionpublic boolean getRerendering()
public void setMasterFrameRate(float rate)
throws DSJException
DSJException
public float getMasterFrameRate()
throws DSJException
DSJExceptionpublic java.lang.String getAsXML()
public void saveAs(java.lang.String newPath,
boolean reopen)
throws DSJException,
java.io.IOException
DSJException
java.io.IOException
public static void mux(java.lang.String inputPath1,
java.lang.String inputPath2,
int[] times,
java.lang.String outputPath)
throws DSJException
DSJExceptionpublic boolean rewriteASFIndex()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||