mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -05:00
Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -40,6 +40,8 @@ import javafx.beans.property.SimpleLongProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
import javafx.util.Callback;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
@@ -54,6 +56,7 @@ import java.net.SocketAddress;
|
||||
@JacksonXmlRootElement(localName = "stream")
|
||||
public abstract class BroadcastConfiguration
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger(BroadcastConfiguration.class);
|
||||
// Static unique channel identifier tracking
|
||||
private static int UNIQUE_ID = 0;
|
||||
|
||||
@@ -395,7 +398,7 @@ public abstract class BroadcastConfiguration
|
||||
@JsonIgnore
|
||||
public boolean isValid()
|
||||
{
|
||||
return validProperty().get();
|
||||
return mValid.get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,12 +28,15 @@ import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
import javafx.util.Callback;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Composite observable object that joins a broadcast configuration and (optional) constructed audio broadcaster
|
||||
*/
|
||||
public class ConfiguredBroadcast
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger(ConfiguredBroadcast.class);
|
||||
private BroadcastConfiguration mBroadcastConfiguration;
|
||||
private AbstractAudioBroadcaster mAudioBroadcaster;
|
||||
private ObjectProperty<BroadcastState> mBroadcastState = new SimpleObjectProperty<>();
|
||||
|
||||
@@ -164,13 +164,4 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||
{
|
||||
mBitRate = bitRate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid()
|
||||
{
|
||||
return getName() != null && !getName().isEmpty() &&
|
||||
getHost() != null && !getHost().isEmpty() &&
|
||||
getPort() > 0 && getPort() < 65535 &&
|
||||
getPassword() != null && !getPassword().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
public ShoutcastV2Configuration()
|
||||
{
|
||||
//No-arg JAXB constructor
|
||||
this(BroadcastFormat.MP3);
|
||||
}
|
||||
|
||||
public ShoutcastV2Configuration(BroadcastFormat format)
|
||||
@@ -203,13 +204,4 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
{
|
||||
return mURL != null && !mURL.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid()
|
||||
{
|
||||
return super.isValid() && hasName() &&
|
||||
getUserID() != null && !getUserID().isEmpty() &&
|
||||
1 <= getStreamID() &&
|
||||
getPassword() != null && !getPassword().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user