public class JOrbisPlayer extends JApplet implements ActionListener, Runnable
Modifier and Type | Class and Description |
---|---|
(package private) class |
JOrbisPlayer.UDPIO
Description of the Class
|
JApplet.AccessibleJApplet
Applet.AccessibleApplet
Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
(package private) static AppletContext |
acontext
Description of the Field
|
(package private) InputStream |
bitStream
Description of the Field
|
(package private) byte[] |
buffer
Description of the Field
|
(package private) int |
bufferLengthInBytes
Description of the Field
|
(package private) static int |
BUFSIZE
Description of the Field
|
(package private) int |
bytes
Description of the Field
|
(package private) JComboBox |
cb
Description of the Field
|
(package private) int |
channels
Description of the Field
|
(package private) static byte[] |
convbuffer
Description of the Field
|
(package private) static int |
convsize
Description of the Field
|
(package private) String |
current_source
Description of the Field
|
(package private) int |
format
Description of the Field
|
(package private) int |
frameSizeInBytes
Description of the Field
|
(package private) boolean |
icestats
Description of the Field
|
(package private) int |
left_vol_scale
Description of the Field
|
private boolean |
loopPaused_
Description of the Field
|
private int |
m_status |
boolean |
noGui |
(package private) Page |
og
Description of the Field
|
(package private) Packet |
op
Description of the Field
|
static int |
OPENED |
(package private) StreamState |
os
Description of the Field
|
(package private) SourceDataLine |
outputLine
Description of the Field
|
(package private) SyncState |
oy
Description of the Field
|
(package private) JPanel |
panel
Description of the Field
|
static int |
PAUSED |
(package private) Thread |
player
Description of the Field
|
static int |
PLAYING |
(package private) boolean |
playing_ |
Vector |
playlist
Description of the Field
|
(package private) String |
playlistfile
Description of the Field
|
(package private) boolean |
playonstartup
Description of the Field
|
(package private) int |
rate
Description of the Field
|
(package private) int |
retry
Description of the Field
|
private int |
RETRY
Description of the Field
|
(package private) int |
right_vol_scale
Description of the Field
|
boolean |
running_as_applet
Description of the Field
|
static int |
SEEKING |
(package private) JButton |
start_button
Description of the Field
|
(package private) JButton |
stats_button
Description of the Field
|
static int |
STOPPED |
(package private) boolean |
timerRunning_
Description of the Field
|
(package private) String |
udp_baddress
Description of the Field
|
(package private) int |
udp_port
Description of the Field
|
static int |
UNKNOWN
These variables are used to distinguish stopped, paused, playing states.
|
(package private) Block |
vb
Description of the Field
|
(package private) Comment |
vc
Description of the Field
|
(package private) DspState |
vd
Description of the Field
|
(package private) Info |
vi
Description of the Field
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JOrbisPlayer()
Constructor for the JOrbisPlayer object
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Handles the gui action events
|
(package private) String |
fetch_m3u(String m3u)
Description of the Method
|
(package private) String |
fetch_pls(String pls)
Description of the Method
|
boolean |
getLoopPaused()
Get Method for class field 'loopPaused_'.
|
(package private) SourceDataLine |
getOutputLine(int channels,
int rate)
Gets the outputLine attribute of the JOrbisPlayer object
|
String |
getTitle()
Gets the title attribute of the JOrbisPlayer object
|
(package private) void |
init_audio(int channels,
int rate)
Description of the Method
|
(package private) void |
init_jorbis()
instantaites all the JOgg streams and states.
|
void |
init()
Initializes stuff.
|
(package private) void |
initUI()
Gets all the GUI panel and buttons init.
|
private int |
item2index(String item)
Looks up the JComboBox item and returns the index of the item.
|
void |
loadPlaylist()
Description of the Method
|
static void |
main(String[] arg)
The main program for the JOrbisPlayer class
|
protected void |
pausePlayback()
Pauses the playback.
|
void |
play_sound()
Description of the Method
|
private void |
play_stream(Thread me)
Description of the Method
|
private void |
play_udp_stream(Thread me)
Description of the Method
|
private String |
readline(InputStream is)
Description of the Method
|
protected void |
resumePlayback()
Resumes the playback.
|
void |
run()
Main processing thread method for the JOrbisPlayer object
|
(package private) InputStream |
selectSource(String item)
Description of the Method
|
void |
setLoopPaused(boolean loopPaused)
Set Method for class field 'loopPaused_'.
|
void |
start()
Description of the Method
|
void |
stop_sound()
Description of the Method
|
void |
stop()
Stop the playback
Player Status = STOPPED.
|
protected void |
togglePause() |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
static final int BUFSIZE
private int RETRY
static AppletContext acontext
static int convsize
static byte[] convbuffer
public boolean running_as_applet
InputStream bitStream
int udp_port
String udp_baddress
int retry
String playlistfile
boolean icestats
StreamState os
byte[] buffer
int bytes
int format
int rate
int channels
int left_vol_scale
int right_vol_scale
SourceDataLine outputLine
String current_source
int frameSizeInBytes
int bufferLengthInBytes
boolean playonstartup
boolean playing_
public boolean noGui
public static final int UNKNOWN
public static final int PLAYING
public static final int PAUSED
public static final int STOPPED
public static final int OPENED
public static final int SEEKING
private int m_status
private boolean loopPaused_
boolean timerRunning_
JButton start_button
JButton stats_button
public JOrbisPlayer()
public static void main(String[] arg)
arg
- The command line argumentspublic void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- Description of the Parameterprivate int item2index(String item)
item
- the combo box item stringpublic void run()
protected void togglePause()
protected void pausePlayback()
protected void resumePlayback()
public void setLoopPaused(boolean loopPaused)
loopPaused
- is the value to set this class field to.public boolean getLoopPaused()
public String getTitle()
public void play_sound()
public void stop_sound()
void init_jorbis()
SourceDataLine getOutputLine(int channels, int rate)
channels
- Description of the Parameterrate
- Description of the Parametervoid init_audio(int channels, int rate)
channels
- Description of the Parameterrate
- Description of the ParameterInputStream selectSource(String item)
item
- Description of the ParameterString fetch_pls(String pls)
pls
- Description of the ParameterString fetch_m3u(String m3u)
m3u
- Description of the Parameterpublic void loadPlaylist()
void initUI()
private void play_stream(Thread me)
me
- Description of the Parameterprivate void play_udp_stream(Thread me)
me
- Description of the Parameterprivate String readline(InputStream is)
is
- Description of the ParameterWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses