mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Updates PlaylistManager to use faster jackson XML serialization.
Removes native xml.bind serialization for improved compatibility with Java 9. Global optimize imports on the entire project.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio;
|
||||
|
||||
import io.github.dsheirer.alias.Alias;
|
||||
import io.github.dsheirer.audio.output.AudioOutput;
|
||||
import io.github.dsheirer.channel.metadata.Metadata;
|
||||
import io.github.dsheirer.icon.IconManager;
|
||||
@@ -30,7 +31,6 @@ import io.github.dsheirer.settings.SettingsManager;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.Alias;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
@@ -18,25 +18,25 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast;
|
||||
|
||||
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastHTTPConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastTCPConfiguration;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.shoutcast.v1.ShoutcastV1Configuration;
|
||||
import io.github.dsheirer.audio.broadcast.shoutcast.v2.ShoutcastV2Configuration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
|
||||
@XmlSeeAlso({BroadcastifyConfiguration.class,
|
||||
IcecastTCPConfiguration.class,
|
||||
IcecastHTTPConfiguration.class,
|
||||
ShoutcastV1Configuration.class,
|
||||
ShoutcastV2Configuration.class})
|
||||
@XmlRootElement(name = "stream")
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = IcecastConfiguration.class, name="icecastConfiguration"),
|
||||
@JsonSubTypes.Type(value = ShoutcastV1Configuration.class, name="shoutcastV1Configuration"),
|
||||
@JsonSubTypes.Type(value = ShoutcastV2Configuration.class, name="shoutcastV2Configuration"),
|
||||
})
|
||||
@JacksonXmlRootElement(localName = "stream")
|
||||
public abstract class BroadcastConfiguration
|
||||
{
|
||||
private BroadcastFormat mBroadcastFormat = BroadcastFormat.MP3;
|
||||
@@ -69,13 +69,18 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* Broadcast server type
|
||||
*/
|
||||
@XmlAttribute(name = "type")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||
public abstract BroadcastServerType getBroadcastServerType();
|
||||
|
||||
private void setBroadcastServerType(BroadcastServerType type)
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* Name identifying this broadcastAudio configuration.
|
||||
*/
|
||||
@XmlAttribute(name = "name")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||
public String getName()
|
||||
{
|
||||
return mName;
|
||||
@@ -102,7 +107,7 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* BROADCAST server host name.
|
||||
*/
|
||||
@XmlAttribute(name = "host")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "host")
|
||||
public String getHost()
|
||||
{
|
||||
return mHost;
|
||||
@@ -129,7 +134,7 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* BROADCAST server port number;
|
||||
*/
|
||||
@XmlAttribute(name = "port")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "port")
|
||||
public int getPort()
|
||||
{
|
||||
return mPort;
|
||||
@@ -153,6 +158,7 @@ public abstract class BroadcastConfiguration
|
||||
return mPort > 0;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public SocketAddress getAddress()
|
||||
{
|
||||
return new InetSocketAddress(getHost(), getPort());
|
||||
@@ -161,7 +167,7 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* Password to authenticate with the streaming server.
|
||||
*/
|
||||
@XmlAttribute(name = "password")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "password")
|
||||
public String getPassword()
|
||||
{
|
||||
return mPassword;
|
||||
@@ -188,7 +194,7 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* Audio broadcastAudio content type (e.g. mp3)
|
||||
*/
|
||||
@XmlAttribute(name = "format")
|
||||
@JacksonXmlProperty(isAttribute = false, localName = "format")
|
||||
public BroadcastFormat getBroadcastFormat()
|
||||
{
|
||||
return mBroadcastFormat;
|
||||
@@ -202,7 +208,7 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* Audio broadcastAudio delay from recording start until the audio file is broadcastAudio to the server.
|
||||
*/
|
||||
@XmlAttribute(name = "delay")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "delay")
|
||||
public long getDelay()
|
||||
{
|
||||
return mDelay;
|
||||
@@ -222,7 +228,7 @@ public abstract class BroadcastConfiguration
|
||||
* queue awaiting streaming before it is purged from the queue. This value is in addition to the delay setting.
|
||||
* @return age in milliseconds
|
||||
*/
|
||||
@XmlAttribute(name = "maximum_recording_age")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "maximum_recording_age")
|
||||
public long getMaximumRecordingAge()
|
||||
{
|
||||
return mMaximumRecordingAge;
|
||||
@@ -241,7 +247,7 @@ public abstract class BroadcastConfiguration
|
||||
/**
|
||||
* Indicates if this broadcaster is enable, meaning that it will automatically connect on startup.
|
||||
*/
|
||||
@XmlAttribute(name = "enabled")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "enabled")
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return mEnabled;
|
||||
@@ -293,7 +299,7 @@ public abstract class BroadcastConfiguration
|
||||
* Indicates if this configuration is valid. A minimal check will ensure that it contains at least a hostname and
|
||||
* port number.
|
||||
*/
|
||||
@XmlTransient
|
||||
@JsonIgnore
|
||||
public boolean isValid()
|
||||
{
|
||||
return mHost != null && mPort > 0;
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast;
|
||||
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||
import io.github.dsheirer.icon.IconManager;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast;
|
||||
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfigurationEditor;
|
||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastHTTPAudioBroadcaster;
|
||||
@@ -43,7 +44,6 @@ import io.github.dsheirer.record.AudioRecorder;
|
||||
import io.github.dsheirer.record.mp3.MP3Recorder;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast;
|
||||
|
||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||
import io.github.dsheirer.audio.AudioPacket;
|
||||
import io.github.dsheirer.channel.metadata.Metadata;
|
||||
import io.github.dsheirer.icon.IconManager;
|
||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.util.ThreadPool;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
package io.github.dsheirer.audio.broadcast;
|
||||
|
||||
import com.jidesoft.swing.JideSplitPane;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.gui.editor.Editor;
|
||||
import io.github.dsheirer.gui.editor.EmptyEditor;
|
||||
import io.github.dsheirer.icon.IconManager;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
|
||||
@@ -18,13 +18,12 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.broadcastify;
|
||||
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastTCPConfiguration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
public class BroadcastifyConfiguration extends IcecastTCPConfiguration
|
||||
{
|
||||
private int mFeedID;
|
||||
@@ -77,13 +76,14 @@ public class BroadcastifyConfiguration extends IcecastTCPConfiguration
|
||||
return copy;
|
||||
}
|
||||
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||
@Override
|
||||
public BroadcastServerType getBroadcastServerType()
|
||||
{
|
||||
return BroadcastServerType.BROADCASTIFY;
|
||||
}
|
||||
|
||||
@XmlAttribute(name="feed_id")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "feed_id")
|
||||
public int getFeedID()
|
||||
{
|
||||
return mFeedID;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
package io.github.dsheirer.audio.broadcast.broadcastify;
|
||||
|
||||
import com.radioreference.api.soap2.UserFeedBroadcast;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||
@@ -29,7 +30,6 @@ import io.github.dsheirer.sample.Listener;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
|
||||
@@ -18,13 +18,20 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.icecast;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
import java.util.Base64;
|
||||
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = IcecastHTTPConfiguration.class, name="icecastHTTPConfiguration"),
|
||||
@JsonSubTypes.Type(value = IcecastTCPConfiguration.class, name="icecastTCPConfiguration"),
|
||||
})
|
||||
public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
{
|
||||
protected String mUserName = "source";
|
||||
@@ -49,7 +56,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
/**
|
||||
* Base64 encoded version of the username and password with prepended 'Basic ' tag.
|
||||
*/
|
||||
@XmlTransient
|
||||
@JsonIgnore
|
||||
public String getBase64EncodedCredentials()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -68,7 +75,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
return "Basic " + base64;
|
||||
}
|
||||
|
||||
@XmlAttribute( name="user_name" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "user_name")
|
||||
public String getUserName()
|
||||
{
|
||||
return mUserName;
|
||||
@@ -86,9 +93,10 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Mount point or path to the stream
|
||||
*
|
||||
* @return mount point
|
||||
*/
|
||||
@XmlAttribute( name="mount_point" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "mount_point")
|
||||
public String getMountPoint()
|
||||
{
|
||||
return mMountPoint;
|
||||
@@ -96,6 +104,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Sets the mount point (path) for the stream
|
||||
*
|
||||
* @param mountPoint
|
||||
*/
|
||||
public void setMountPoint(String mountPoint)
|
||||
@@ -118,7 +127,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
return mMountPoint != null;
|
||||
}
|
||||
|
||||
@XmlAttribute( name="description" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "description")
|
||||
public String getDescription()
|
||||
{
|
||||
return mDescription;
|
||||
@@ -137,7 +146,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
/**
|
||||
* Stream genre
|
||||
*/
|
||||
@XmlAttribute( name="genre" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "genre")
|
||||
public String getGenre()
|
||||
{
|
||||
return mGenre;
|
||||
@@ -145,6 +154,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Stream genre
|
||||
*
|
||||
* @param genre
|
||||
*/
|
||||
public void setGenre(String genre)
|
||||
@@ -160,7 +170,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
/**
|
||||
* Public visibility of the broadcastAudio
|
||||
*/
|
||||
@XmlAttribute( name="public" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "public")
|
||||
public boolean isPublic()
|
||||
{
|
||||
return mPublic;
|
||||
@@ -168,6 +178,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Sets public visibility of the broadcastAudio
|
||||
*
|
||||
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
||||
*/
|
||||
public void setPublic(boolean isPublic)
|
||||
@@ -178,7 +189,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
/**
|
||||
* Number of audio channels in the broadcastAudio
|
||||
*/
|
||||
@XmlAttribute( name="channels" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "channels")
|
||||
public int getChannels()
|
||||
{
|
||||
return mChannels;
|
||||
@@ -200,7 +211,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
/**
|
||||
* Bit rate in bits per second
|
||||
*/
|
||||
@XmlAttribute( name="bitrate" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "bitrate")
|
||||
public int getBitRate()
|
||||
{
|
||||
return mBitRate;
|
||||
@@ -208,6 +219,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Bit rate
|
||||
*
|
||||
* @param bitRate in samples per second
|
||||
*/
|
||||
public void setBitRate(int bitRate)
|
||||
@@ -220,7 +232,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
return mBitRate > 0;
|
||||
}
|
||||
|
||||
@XmlAttribute( name="sample_rate" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "sample_rate")
|
||||
public int getSampleRate()
|
||||
{
|
||||
return mSampleRate;
|
||||
@@ -239,7 +251,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
/**
|
||||
* URL associated with the broadcastAudio where users can find additional details.
|
||||
*/
|
||||
@XmlAttribute( name="url" )
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "url")
|
||||
public String getURL()
|
||||
{
|
||||
return mURL;
|
||||
@@ -247,6 +259,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* URL associated with the broadcastAudio where users can find additional details.
|
||||
*
|
||||
* @param url
|
||||
*/
|
||||
public void setURL(String url)
|
||||
|
||||
@@ -18,10 +18,13 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.icecast;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||
|
||||
@JsonSubTypes.Type(value=IcecastHTTPConfiguration.class, name="icecastHTTPConfiguration")
|
||||
public class IcecastHTTPConfiguration extends IcecastConfiguration
|
||||
{
|
||||
public IcecastHTTPConfiguration()
|
||||
@@ -66,11 +69,10 @@ public class IcecastHTTPConfiguration extends IcecastConfiguration
|
||||
return copy;
|
||||
}
|
||||
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||
@Override
|
||||
public BroadcastServerType getBroadcastServerType()
|
||||
{
|
||||
return BroadcastServerType.ICECAST_HTTP;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.icecast;
|
||||
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.icecast;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||
@@ -25,9 +28,10 @@ import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
@XmlSeeAlso( {BroadcastifyConfiguration.class } )
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = BroadcastifyConfiguration.class, name="broadcastifyConfiguration"),
|
||||
})
|
||||
public class IcecastTCPConfiguration extends IcecastConfiguration
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger( IcecastTCPConfiguration.class );
|
||||
@@ -70,6 +74,7 @@ public class IcecastTCPConfiguration extends IcecastConfiguration
|
||||
return copy;
|
||||
}
|
||||
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||
@Override
|
||||
public BroadcastServerType getBroadcastServerType()
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.icecast;
|
||||
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
|
||||
@@ -18,12 +18,11 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.shoutcast.v1;
|
||||
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
{
|
||||
private String mGenre;
|
||||
@@ -73,7 +72,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Stream genre
|
||||
*/
|
||||
@XmlAttribute(name="genre")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "genre")
|
||||
public String getGenre()
|
||||
{
|
||||
return mGenre;
|
||||
@@ -81,6 +80,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Stream genre
|
||||
*
|
||||
* @param genre
|
||||
*/
|
||||
public void setGenre(String genre)
|
||||
@@ -91,7 +91,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Stream description
|
||||
*/
|
||||
@XmlAttribute(name="description")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "description")
|
||||
public String getDescription()
|
||||
{
|
||||
return mDescription;
|
||||
@@ -99,6 +99,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Stream description
|
||||
*
|
||||
* @param description
|
||||
*/
|
||||
public void setDescription(String description)
|
||||
@@ -109,7 +110,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Public visibility of the broadcastAudio
|
||||
*/
|
||||
@XmlAttribute(name="public")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "public")
|
||||
public boolean isPublic()
|
||||
{
|
||||
return mPublic;
|
||||
@@ -117,6 +118,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Sets public visibility of the broadcastAudio
|
||||
*
|
||||
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
||||
*/
|
||||
public void setPublic(boolean isPublic)
|
||||
@@ -127,7 +129,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Number of audio channels in the broadcastAudio
|
||||
*/
|
||||
@XmlAttribute(name="channels")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "channels")
|
||||
public int getChannels()
|
||||
{
|
||||
return mChannels;
|
||||
@@ -144,7 +146,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Bit rate in bits per second
|
||||
*/
|
||||
@XmlAttribute(name="bitrate")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "bitrate")
|
||||
public int getBitRate()
|
||||
{
|
||||
return mBitRate;
|
||||
@@ -152,6 +154,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Bit rate
|
||||
*
|
||||
* @param bitRate in samples per second
|
||||
*/
|
||||
public void setBitRate(int bitRate)
|
||||
@@ -163,8 +166,8 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
public boolean isValid()
|
||||
{
|
||||
return getName() != null && !getName().isEmpty() &&
|
||||
getHost() != null && !getHost().isEmpty() &&
|
||||
getPort() > 0 && getPort() < 65535 &&
|
||||
getPassword() != null && !getPassword().isEmpty();
|
||||
getHost() != null && !getHost().isEmpty() &&
|
||||
getPort() > 0 && getPort() < 65535 &&
|
||||
getPassword() != null && !getPassword().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.shoutcast.v1;
|
||||
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
|
||||
@@ -18,13 +18,12 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.shoutcast.v2;
|
||||
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
{
|
||||
private int mStreamID;
|
||||
@@ -78,7 +77,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Stream ID
|
||||
*/
|
||||
@XmlAttribute(name = "stream_id")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "stream_id")
|
||||
public int getStreamID()
|
||||
{
|
||||
return mStreamID;
|
||||
@@ -98,7 +97,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* User ID
|
||||
*/
|
||||
@XmlAttribute(name = "user_id")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "user_id")
|
||||
public String getUserID()
|
||||
{
|
||||
return mUserID;
|
||||
@@ -106,6 +105,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Sets the user ID
|
||||
*
|
||||
* @param userID
|
||||
*/
|
||||
public void setUserID(String userID)
|
||||
@@ -116,7 +116,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Bit rate in kilobits per second
|
||||
*/
|
||||
@XmlAttribute(name = "bitrate")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "bitrate")
|
||||
public int getBitRate()
|
||||
{
|
||||
return mBitRate;
|
||||
@@ -124,6 +124,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Bit rate
|
||||
*
|
||||
* @param bitRate in kilobits per second
|
||||
*/
|
||||
public void setBitRate(int bitRate)
|
||||
@@ -134,7 +135,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Stream genre
|
||||
*/
|
||||
@XmlAttribute(name = "genre")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "genre")
|
||||
public String getGenre()
|
||||
{
|
||||
return mGenre;
|
||||
@@ -157,7 +158,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Public visibility of the broadcastAudio
|
||||
*/
|
||||
@XmlAttribute(name = "public")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "public")
|
||||
public boolean isPublic()
|
||||
{
|
||||
return mPublic;
|
||||
@@ -165,6 +166,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* Sets public visibility of the broadcastAudio
|
||||
*
|
||||
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
||||
*/
|
||||
public void setPublic(boolean isPublic)
|
||||
@@ -175,7 +177,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* URL associated with the broadcastAudio where users can find additional details.
|
||||
*/
|
||||
@XmlAttribute(name = "url")
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "url")
|
||||
public String getURL()
|
||||
{
|
||||
return mURL;
|
||||
@@ -183,6 +185,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
|
||||
/**
|
||||
* URL associated with the broadcastAudio where users can find additional details.
|
||||
*
|
||||
* @param url
|
||||
*/
|
||||
public void setURL(String url)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.audio.broadcast.shoutcast.v2;
|
||||
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.github.dsheirer.alias.AliasModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
package io.github.dsheirer.audio.invert;
|
||||
|
||||
import io.github.dsheirer.audio.InversionFrequency;
|
||||
import io.github.dsheirer.sample.real.RealSampleListener;
|
||||
import io.github.dsheirer.dsp.filter.Filters;
|
||||
import io.github.dsheirer.dsp.filter.FloatFIRFilter;
|
||||
import io.github.dsheirer.dsp.mixer.Oscillator;
|
||||
import io.github.dsheirer.sample.real.RealSampleListener;
|
||||
|
||||
/**
|
||||
* Applies audio inversion (or un-inversion) to a broadcast of float audio samples
|
||||
|
||||
Reference in New Issue
Block a user