public class MetadataFinder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
METADATA_PORT
The port on which we contact players to ask them for metadata information.
|
| Constructor and Description |
|---|
MetadataFinder() |
| Modifier and Type | Method and Description |
|---|---|
static Map<Integer,TrackMetadata> |
getLatestMetadata()
Get all currently known metadata.
|
static TrackMetadata |
getLatestMetadataFor(DeviceUpdate update)
Look up the track metadata we have for a given player, identified by a status update received from that player.
|
static TrackMetadata |
getLatestMetadataFor(int player)
Look up the track metadata we have for a given player number.
|
static boolean |
isRunning()
Check whether we are currently running.
|
static TrackMetadata |
requestMetadataFrom(CdjStatus status)
Given a status update from a CDJ, find the metadata for the track that it has loaded, if any.
|
static TrackMetadata |
requestMetadataFrom(int player,
CdjStatus.TrackSourceSlot slot,
int rekordboxId)
Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID.
|
static void |
start()
Start finding track metadata for all active players.
|
static void |
stop()
Stop finding track metadata for all active players.
|
public static final int METADATA_PORT
public static TrackMetadata requestMetadataFrom(CdjStatus status)
status - the CDJ status update that will be used to determine the loaded track and ask the appropriate
player for metadata about itpublic static TrackMetadata requestMetadataFrom(int player, CdjStatus.TrackSourceSlot slot, int rekordboxId)
player - the player number whose track is of interestslot - the slot in which the track can be foundrekordboxId - the track of interestpublic static boolean isRunning()
public static Map<Integer,TrackMetadata> getLatestMetadata()
public static TrackMetadata getLatestMetadataFor(int player)
player - the device number whose track metadata is desiredpublic static TrackMetadata getLatestMetadataFor(DeviceUpdate update)
update - a status update from the player for which track metadata is desiredpublic static void start()
throws Exception
VirtualCdj if it is not already
running, because we need it to send us device status updates to notice when new tracks are loaded.Exception - if there is a problem starting the required componentspublic static void stop()
Copyright © 2016 Deep Symmetry, LLC. All rights reserved.