mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 09:37:36 -05:00
#30 - adds streaming status color indicators to the streaming panel table.
Resolves issue with temporary streaming file name collisions by adding a 1-up number to each generated temporary recording file.
This commit is contained in:
@@ -22,12 +22,13 @@ import audio.broadcast.BroadcastConfiguration;
|
||||
import audio.broadcast.BroadcastFormat;
|
||||
import audio.broadcast.BroadcastServerType;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
{
|
||||
private int mStreamID;
|
||||
private String mUserID;
|
||||
private int mBitRate = 16;
|
||||
private String mStreamName;
|
||||
private String mGenre;
|
||||
private String mURL;
|
||||
private boolean mPublic = true;
|
||||
@@ -59,7 +60,6 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
copy.setStreamID(getStreamID());
|
||||
copy.setUserID(getUserID());
|
||||
copy.setBitRate(getBitRate());
|
||||
copy.setStreamName(getStreamName());
|
||||
copy.setGenre(getGenre());
|
||||
copy.setURL(getURL());
|
||||
copy.setPublic(isPublic());
|
||||
@@ -77,6 +77,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Stream ID
|
||||
*/
|
||||
@XmlAttribute(name = "stream_id")
|
||||
public int getStreamID()
|
||||
{
|
||||
return mStreamID;
|
||||
@@ -96,6 +97,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* User ID
|
||||
*/
|
||||
@XmlAttribute(name = "user_id")
|
||||
public String getUserID()
|
||||
{
|
||||
return mUserID;
|
||||
@@ -113,6 +115,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* Bit rate in kilobits per second
|
||||
*/
|
||||
@XmlAttribute(name = "bitrate")
|
||||
public int getBitRate()
|
||||
{
|
||||
return mBitRate;
|
||||
@@ -127,26 +130,10 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
mBitRate = bitRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream name
|
||||
*/
|
||||
public String getStreamName()
|
||||
{
|
||||
return mStreamName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the stream name
|
||||
* @param name
|
||||
*/
|
||||
public void setStreamName(String name)
|
||||
{
|
||||
mStreamName = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream genre
|
||||
*/
|
||||
@XmlAttribute(name = "genre")
|
||||
public String getGenre()
|
||||
{
|
||||
return mGenre;
|
||||
@@ -160,9 +147,16 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
mGenre = genre;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasGenre()
|
||||
{
|
||||
return mGenre != null && !mGenre.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Public visibility of the broadcastAudio
|
||||
*/
|
||||
@XmlAttribute(name = "public")
|
||||
public boolean isPublic()
|
||||
{
|
||||
return mPublic;
|
||||
@@ -180,6 +174,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
/**
|
||||
* URL associated with the broadcastAudio where users can find additional details.
|
||||
*/
|
||||
@XmlAttribute(name = "url")
|
||||
public String getURL()
|
||||
{
|
||||
return mURL;
|
||||
@@ -193,4 +188,18 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||
{
|
||||
mURL = url;
|
||||
}
|
||||
|
||||
public boolean hasURL()
|
||||
{
|
||||
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