Adds wave file LIST metadata chunk to audio recordings.

Note: the metadata chunk may be added multiple times over the life span
of an audio call, as additional metadata details are added.
This commit is contained in:
Denny
2017-12-24 06:51:09 -05:00
parent 7391265949
commit 6e352143d2
10 changed files with 1132 additions and 343 deletions

View File

@@ -63,6 +63,8 @@ public class Metadata
protected Boolean mDoNotRecord;
private Set<BroadcastChannel> mBroadcastChannels;
private long mTimestamp = System.currentTimeMillis();
/**
* Channel metadata. Contains all attributes that reflect the state and current attribute values for a channel
@@ -82,6 +84,14 @@ public class Metadata
mMetadataID = metadataID;
}
/**
* Timestamp when this metadata was created
* @return milliseconds since epoch
*/
public long getTimestamp()
{
return mTimestamp;
}
/**
* Unique string identifier for this metadata that is comprised of the channel ID and the primary TO address.
*

View File

@@ -34,6 +34,7 @@ import java.util.concurrent.ScheduledExecutorService;
public class AlwaysUnsquelchedDecoderState extends DecoderState
{
private final static Logger mLog = LoggerFactory.getLogger(AlwaysUnsquelchedDecoderState.class);
private static final String NO_SQUELCH = "No Squelch";
private DecoderType mDecoderType;
private String mChannelName;
@@ -82,7 +83,7 @@ public class AlwaysUnsquelchedDecoderState extends DecoderState
{
//Each time we're reset, set the PRIMARY TO attribute back to the channel name, otherwise we won't have
//a primary ID for any audio produced by this state.
broadcast(new AttributeChangeRequest<String>(Attribute.PRIMARY_ADDRESS_TO, mChannelName));
broadcast(new AttributeChangeRequest<String>(Attribute.PRIMARY_ADDRESS_TO, NO_SQUELCH));
}
}
@@ -95,7 +96,7 @@ public class AlwaysUnsquelchedDecoderState extends DecoderState
@Override
public void start(ScheduledExecutorService executor)
{
broadcast(new AttributeChangeRequest<String>(Attribute.PRIMARY_ADDRESS_TO, mChannelName));
broadcast(new AttributeChangeRequest<String>(Attribute.PRIMARY_ADDRESS_TO, NO_SQUELCH));
broadcast(new DecoderStateEvent(this, Event.ALWAYS_UNSQUELCH, State.IDLE));
}