public interface DirectMediaPlayer extends MediaPlayer
Such a media player is useful for user interface toolkits that do not support the embedding of an AWT Canvas, like JavaFX or an OpenGL toolkit like jMonkeyEngine.
A direct media player is also useful for applications that need access to the video frame data to process it in some way.
Modifier and Type | Method and Description |
---|---|
com.sun.jna.Memory[] |
lock()
Lock the native memory buffers.
|
void |
unlock()
Unlock the native memory buffers.
|
addMediaOptions, addMediaPlayerEventListener, canPause, cycleSpu, enableEvents, enableLogo, enableMarquee, getAllChapterDescriptions, getAspectRatio, getAudioChannel, getAudioDelay, getAudioDescriptions, getAudioOutputDevice, getAudioOutputDevices, getAudioTrack, getAudioTrackCount, getBrightness, getChapter, getChapterCount, getChapterDescriptions, getChapterDescriptions, getCodecDescription, getContrast, getCropGeometry, getEqualizer, getFps, getGamma, getHue, getLength, getMediaDetails, getMediaMeta, getMediaMeta, getMediaPlayerState, getMediaState, getMediaStatistics, getMediaStatistics, getPosition, getRate, getRepeat, getSaturation, getScale, getSnapshot, getSnapshot, getSpu, getSpuCount, getSpuDelay, getSpuDescriptions, getSubItemMediaMeta, getSubItemTrackInfo, getTeletextPage, getTime, getTitle, getTitleCount, getTitleDescriptions, getTrackInfo, getTrackInfo, getVideoDescriptions, getVideoDimension, getVideoOutputs, getVideoTrack, getVideoTrackCount, getVolume, isAdjustVideo, isMediaParsed, isMute, isPlayable, isPlaying, isSeekable, mediaPlayerInstance, menuActivate, menuDown, menuLeft, menuRight, menuUp, mrl, mrl, mute, mute, nextChapter, nextFrame, parseMedia, pause, play, playMedia, playNextSubItem, playSubItem, prepareMedia, previousChapter, programScrambled, release, removeMediaPlayerEventListener, requestParseMedia, requestParseMediaWithOptions, saveSnapshot, saveSnapshot, saveSnapshot, saveSnapshot, setAdjustVideo, setAspectRatio, setAudioChannel, setAudioDelay, setAudioOutput, setAudioOutputDevice, setAudioTrack, setBrightness, setChapter, setContrast, setCropGeometry, setDeinterlace, setEqualizer, setGamma, setHue, setLogoFile, setLogoImage, setLogoLocation, setLogoOpacity, setLogoOpacity, setLogoPosition, setMarqueeColour, setMarqueeColour, setMarqueeLocation, setMarqueeOpacity, setMarqueeOpacity, setMarqueePosition, setMarqueeSize, setMarqueeText, setMarqueeTimeout, setPause, setPlaySubItems, setPosition, setRate, setRepeat, setSaturation, setScale, setSnapshotDirectory, setSpu, setSpuDelay, setStandardMediaOptions, setSubTitleFile, setSubTitleFile, setTeletextPage, setTime, setTitle, setVideoTitleDisplay, setVideoTrack, setVolume, skip, skipPosition, start, startMedia, stop, subItemCount, subItemIndex, subItems, subItemsMedia, subItemsMediaList, toggleTeletext, userData, userData
com.sun.jna.Memory[] lock()
The lock must be held for as short a time as possible - locking the buffers will prevent the native video player from filling more frames.
A corresponding call to unlock()
must always be made, no matter what
the return value from this method.
A client application must not interfere with the returned array - the returned array is the "live" array used by the media player, so a client must not add/remove/re-order/etc the returned array.
To mitigate this, a defensive copy of the array could have been returned, but this would be added overhead (even though slight) that can be avoided.
null
void unlock()
Copyright © 2009–2015 Caprica Software Limited. All rights reserved.