public class DSMovie extends DSFiltergraph
| Modifier and Type | Class and Description |
|---|---|
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.
|
DSFiltergraph.DSAudioStream| Modifier and Type | Field and Description |
|---|---|
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 |
ACTIVATING, ANAMORPHIC, ASYNC_BUFFER_GET, ASYNC_BUFFER_REQ, AUDIO_BUFFER_REQUEST, BDA, BDA_PRG_CHANGED, BDA_SCAN_PROGRESS, BDA_SCANNED_FREQ, BDA_SIG_REC, BUFFER_COMPLETE, BUFFERING, CALLER, CAP_STATE_CHANGED, CAPTURE, CLOSED, CLOSING, COMP_AUDIO_BUFFER_REQ, COMP_BUFFER_FILLED, COMP_VIDEO_BUFFER_REQ, D3D9, DD7, DECKLINK, DELIVER_AUDIO, DES_ERROR, DONE, DV, DV_STATE_CHANGED, DVD, DVD_FORMAT_CHANGED, DVD_MENU_ENABLED, E_CANT_PUMP_AUDIO, E_INIT_HEADLESS, EDITABLE, ENTER_FS, EPG, EVR, EXIT_FS, EXPORT_DONE, EXPORT_FINISHING, EXPORT_PROGRESS, EXPORT_STARTED, EXT_API_EVENT, FILTER_CHANGED, FORMAT_CHANGED, FRAME_CALLBACK, FRAME_LOCKED, FRAME_NOTIFY, GD, GE_DEVICE_CONNECTED, GE_DEVICE_LOST, GE_REF_REC_STOPPED, GRAPH, GRAPH_CHANGED, GRAPH_ERROR, GRAPH_EVENT, HDV, HDV_STATE_CHANGED, HEADLESS, INDEXER_DONE, INDEXER_STARTED, INIT_MUTED, INIT_PAUSED, INITIALIZED, IP_READY, J2D, JAVA_AUTODRAW, JAVA_POLL, JAVA_POLL_RGB, JAVASOUND, KEY_EVENT, KF_NOTIFY, LOCK_BUFFER, LOOP, MGD, MOUSE_ENABLED, MOUSE_EVENT, MOVIE, NATIVE_FORCE_GDI, NIO_UPDATE, NO_AMW, NO_SYNC, NULL, ONESHOT, OVERLAY, OVERLAY_BUFFER_REQUEST, PLAYLIST_PARSED, PREVIEW, RENDER_NATIVE, RESTART_REQ, RGB32, RTCP_EVENT, RTMP_EVENT, RTMP_SO_CHANGED, RTMP_STATE_CHANGED, SAMPLE_BUFFER_FILLED, SAVE_DONE, SAVE_STARTED, SBE, SBE_REC_STATE_CHANGED, SERVICE_ERROR, SERVICE_EVENT, SINK_ERROR, SINK_STATE_CHANGED, SIZE_CHANGED, SOURCE_ERROR, SOURCE_STATE_CHANGED, SOURCE_STATE_NOTIFY, SOURCE_USER_DATA, STILL_IMG_RECEIVED, STREAM_SEEK, SUBCLASS_EVENT, SUBSTREAM_INFO, SWING, SYNC_BUFFER_REQ, TABLE_RECEIVED, TIME_FORMAT_CHANGED, TRANS_IN_PLACE, TRANSPORT, TS_BUFFER_FILLED, type, URL_CHANGED, VIDEO_BUFFER_REQUEST, VMR_EMBED, VMR7, VMR9, VPJ, YUV, YUV_ORG| Constructor and Description |
|---|
DSMovie(java.lang.String path,
int flags,
DSFilterInfo[] filters,
java.beans.PropertyChangeListener pcl)
Creates a movie object from common media files and urls using the filters given in the array argument.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addColorSpaceConverter, addFilterToGraph, addNotify, addPropertyChangeListener, asComponent, connectDump, connectSink, createDSFiltergraph, dispose, dumpGraph, findFilterByName, findRenderer, flipImage, getActive, getAspectLocked, getAspectRatio, getAudioProperties, getAudioStream, getBitDepth, getData, getDataSize, getDisplaySize, getDuration, getEffectiveFrameRate, getFrameRate, getFullScreenWindow, getID, getImage, getLoop, getMediaDimension, getMinimumSize, getOutFlags, getPan, getPreferredSize, getRate, getRendererControls, getTime, getVolume, getYUVType, goFullScreen, graphChanged, hasMediaOfType, insertFilter, insertOverlayFilter, insertSampleAccessFilter, insertTransInPlaceFilter, isFullScreen, isSubGraph, leaveFullScreen, listFilters, lockAspectRatio, paint, pause, play, queryCapability, redraw, register, reloadFilter, removeFilter, removeNotify, removePropertyChangeListener, removeSink, setAudioRenderer, setAviExportOptions, setBounds, setClockSource, setEvent, setLoop, setPan, setPreferredSize, setRate, setTimeValue, setVolume, step, stop, tearDown, unsync, updatecreateBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategyaction, 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, revalidate, 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, validatepublic 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
public DSMovie(java.lang.String path,
int flags,
java.beans.PropertyChangeListener pcl)
throws DSJException
DSJExceptionpublic DSMovie(java.lang.String path,
int flags,
DSFilterInfo videoDecoder,
DSFilterInfo audioDecoder,
java.beans.PropertyChangeListener pcl)
throws DSJException
DSJExceptionpublic DSMovie(java.lang.String path,
int flags,
DSFilterInfo[] filters,
java.beans.PropertyChangeListener pcl)
throws DSJException
DSJExceptionpublic java.lang.String getCurrentFile()
public int loadFile(java.lang.String path,
int restartAt)
throws DSJException
DSJExceptionpublic int loadFile(java.lang.String path)
throws DSJException
DSJExceptionpublic 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
DSJExceptionpublic 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
DSJExceptionpublic void cancelExport()
throws DSJException
DSJExceptionpublic 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
DSJExceptionpublic int getTrackCount(int mediaType)
throws DSJException
DSJExceptionpublic MovieTrack getIndTrack(int trackIndex) throws DSJException
DSJExceptionpublic MovieTrack getTrack(int trackID) throws DSJException
DSJExceptionpublic MovieTrack getIndTrackType(int mediaType, int index) throws DSJException
DSJExceptionpublic void createBackground(int from,
int to,
int ARGB,
int width,
int height)
throws DSJException
DSJExceptionpublic static DSMovie createEmptyMovie(DSMediaType videoType, DSMediaType audioType, java.beans.PropertyChangeListener pcl)
public void setMasterVolume(float vol)
throws DSJException
DSJExceptionpublic DSMovie.MovieSelection copy() throws DSJException
DSJExceptionpublic static DSMovie.MovieSelection copyToClipboard(java.lang.String fileName, int in, int out) throws DSJException
DSJExceptionpublic void paste(DSMovie.MovieSelection ms) throws DSJException
DSJExceptionpublic void add(DSMovie.MovieSelection ms) throws DSJException
DSJExceptionpublic void cut()
throws DSJException
DSJExceptionpublic void clear()
throws DSJException
DSJExceptionpublic void replace(DSMovie.MovieSelection ms)
public void trim()
throws DSJException
DSJExceptionpublic void removeTrack(MovieTrack track) throws DSJException
DSJExceptionpublic void setRerendering(boolean immediateRerender)
throws DSJException
DSJExceptionpublic boolean getRerendering()
public void setMasterFrameRate(float rate)
throws DSJException
DSJExceptionpublic float getMasterFrameRate()
throws DSJException
DSJExceptionpublic java.lang.String getAsXML()
public void saveAs(java.lang.String newPath,
boolean reopen)
throws DSJException,
java.io.IOException
DSJExceptionjava.io.IOExceptionpublic static void mux(java.lang.String inputPath1,
java.lang.String inputPath2,
int[] times,
java.lang.String outputPath)
throws DSJException
DSJExceptionpublic boolean rewriteASFIndex()