mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
-Reduces message and event histories per channel from 500 to 200. -Resolves issue of tuner freezing due to cancelled USB transfer buffers not being resubmitted. -Reworks the audio playback system to remove in-progress call preemption and remove thread locks which can cause glitchy behavior during audio playback. -Updates audio outputs to also use single thread pool for processing audio segments. -Updates MBECallSequenceConverter to batch convert MBE to WAV audio. -Unifies recording filename prefixes across baseband, mbe and binary recordings. -Resolves issue with registering heartbeat manager to dispatcher. -Uses single-thread thread pools for Dispatcher to support batch & process to overcome context switching consistency issue in Windows. Co-authored-by: Dennis Sheirer <dsheirer@github.com>
80 lines
2.4 KiB
Java
80 lines
2.4 KiB
Java
/*
|
|
* *****************************************************************************
|
|
* Copyright (C) 2014-2023 Dennis Sheirer
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
* ****************************************************************************
|
|
*/
|
|
|
|
package io.github.dsheirer.preference;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
/**
|
|
* Timestamp formats
|
|
*/
|
|
public enum TimestampFormat
|
|
{
|
|
TIMESTAMP_DEFAULT("yyyy-MM-dd HH:mm:ss", "Timestamp: yyyy-MM-dd HH:mm:ss"),
|
|
TIMESTAMP_COLONS("yyyy:MM:dd:HH:mm:ss", "Timestamp Colons: yyyy:MM:dd:HH:mm:ss"),
|
|
TIMESTAMP_MILLIS("yyyy:MM:dd:HH:mm:ss.SSS", "Timestamp Milliseconds: yyyy:MM:dd:HH:mm:ss.SSS"),
|
|
TIMESTAMP_COMPACT("yyyyMMdd_HHmmss", "Timestamp Compact: yyyyMMdd_HHmmss"),
|
|
DATE_DASHES("yyyy-MM-dd", "Date Dashes: YYYY-MM-DD"),
|
|
DATE_COLONS("yyyy:MM:dd", "Date Colons: YYYY:MM:DD"),
|
|
DATE_COMPACT("yyyyMMdd", "Date Compact: YYYYMMDD"),
|
|
TIME_COMPACT("HHmmss", "Time Compact: HHmmss"),
|
|
TIME_COLONS("HH:mm:ss", "Time Colons: HH:mm:ss"),
|
|
TIME_MILLIS("HH:mm:ss.SSS", "Time Milliseconds: HH:mm:ss.SSS"),
|
|
TIME_SECONDS("ss.SSS", "Time Seconds: ss.SSS");
|
|
|
|
private String mFormat;
|
|
private String mLabel;
|
|
|
|
/**
|
|
* Constructs a timestamp format
|
|
* @param format for the timestamp
|
|
* @param label to describe the format
|
|
*/
|
|
TimestampFormat(String format, String label)
|
|
{
|
|
mFormat = format;
|
|
mLabel = label;
|
|
}
|
|
|
|
/**
|
|
* Format string for the timestamp format
|
|
*/
|
|
public String getFormat()
|
|
{
|
|
return mFormat;
|
|
}
|
|
|
|
/**
|
|
* Creates a new Simple Date Formatter to use format string.
|
|
*/
|
|
public SimpleDateFormat getFormatter()
|
|
{
|
|
return new SimpleDateFormat(mFormat);
|
|
}
|
|
|
|
/**
|
|
* Overrides the toString() with a descriptive label
|
|
*/
|
|
@Override
|
|
public String toString()
|
|
{
|
|
return mLabel;
|
|
}
|
|
}
|