public class PlaybackControl extends PamControlledUnit implements PamSettings
Constructor and Description |
---|
PlaybackControl(java.lang.String unitName) |
Modifier and Type | Method and Description |
---|---|
float |
choseSampleRate() |
javax.swing.JMenuItem |
createDetectionMenu(java.awt.Frame parentFrame)
Create a JMenu object containing MenuItems associated with PamProcesses
|
PlaybackSystem |
findPlaybackSystem(PamDataBlock sourceDataBlock) |
FilePlayback |
getFilePlayback() |
int |
getMaxPlaybackChannels(PlaybackSystem playbackSystem) |
PlaybackParameters |
getPlaybackParameters() |
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
static PlaybackControl |
getViewerPlayback()
Static easy access to the playback module in PAMGUARD viewer
mode.
|
boolean |
hasPlayDataSource() |
boolean |
isRealTimePlayback()
Returns true if the playback is real time.
|
void |
notifyModelChanged(int changeType)
General notification when the PAMGAURD model changes.
|
boolean |
playViewerData(int channelMap,
long startMillis,
long endMillis,
PlaybackProgressMonitor playbackProgressMonitor)
Play back raw audio data for a specific channel.
|
boolean |
playViewerData(int channelMap,
long startMillis,
long endMillis,
PlaybackProgressMonitor playbackProgressMonitor,
PlaybackDataServer playDataServer)
This one is for playing back non-raw data through the sound card.
|
boolean |
playViewerData(long startMillis,
long endMillis,
PlaybackProgressMonitor playbackProgressMonitor)
The simplest of the viewer instructions simply
instructs the playback module to play data from
it's own data source between the given times.
|
static void |
registerPlayButton(javax.swing.AbstractButton button) |
static void |
registerStopButton(javax.swing.AbstractButton button) |
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
void |
stopViewerPlayback()
Stop viewer playback.
|
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addRelatedMenuItems, addXMLParameter, addXMLParameter, addXMLParameter, addXMLParameter, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, fillXMLElement, flushDataBlockBuffers, getFrameNumber, getGuiFrame, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineTaskGroup, getPamController, getPamModuleInfo, getPamProcess, getPamView, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setupControlledUnit, stopViewerSound, terminalPrint, terminalPrintln, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUnitName, getUnitType
public FilePlayback getFilePlayback()
public static PlaybackControl getViewerPlayback()
This may involve allowing the playback module to use it's own data source, but it may also be instructed to take data from elsewhere - e.g. reconstructed clicks from the click detector.
public static void registerPlayButton(javax.swing.AbstractButton button)
public static void registerStopButton(javax.swing.AbstractButton button)
public java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public javax.swing.JMenuItem createDetectionMenu(java.awt.Frame parentFrame)
PamControlledUnit
createDetectionMenu
in class PamControlledUnit
parentFrame
- The owner frame of the menuNote that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
public PlaybackSystem findPlaybackSystem(PamDataBlock sourceDataBlock)
public int getMaxPlaybackChannels(PlaybackSystem playbackSystem)
public float choseSampleRate()
public void notifyModelChanged(int changeType)
PamControlledUnit
notifyModelChanged
in class PamControlledUnit
changeType
- type of changepublic PlaybackParameters getPlaybackParameters()
public boolean playViewerData(int channelMap, long startMillis, long endMillis, PlaybackProgressMonitor playbackProgressMonitor)
channelMap
- startMillis
- endMillis
- playbackProgressMonitor
- public boolean playViewerData(long startMillis, long endMillis, PlaybackProgressMonitor playbackProgressMonitor)
startMillis
- start timeendMillis
- end timeplaybackProgressMonitor
- progress monitorpublic boolean playViewerData(int channelMap, long startMillis, long endMillis, PlaybackProgressMonitor playbackProgressMonitor, PlaybackDataServer playDataServer)
A new thread will be launched which will call back into playDataServer. playDataServer will have to prepare rawDataUnits which get passed on to the PlaybackProcess. These rawDataUnits will have to follow the basic form of any normal rawDataUnit, but can probably vary a bit in length if necessary.
channelMap
- startMillis
- endMillis
- playbackProgressMonitor
- playDataServer
- public void stopViewerPlayback()
public boolean hasPlayDataSource()
public boolean isRealTimePlayback()