Merge branch 'master' of github.com:limelight-stream/limelight-pc

# By Cameron Gutman (15) and others
# Via Cameron Gutman (2) and Diego Waxemberg (1)
* 'master' of github.com:limelight-stream/limelight-pc:
  Update common jar
  Fix library loading on Windows when not using a JAR
  Delete the extracted libraries when Limelight terminates
  Update common jar
  Write a better native library loader so DLLs are no longer extracted to the current directory on Windows.
  Suppress log spam from jinput on Windows 8 and higher
  Rough Draft of Icon
  Fix settings.lime being created as a directory. See GitHub issue 1 for details.
  Update limelight-common jar
  Use the stream's frame rate as the redraw rate instead of always refreshing at 30 FPS
  Don't print stack traces for InterruptExceptions. Call the NvConnectionListener class to terminate the stream without causing the unexpected termination error dialog.
  Fix resolution changing on Windows. Improve the resolution selection algorithm.
  Only use the audio buffer hack on OS X
  dynamically increase the buffer size if we build up to large of a queue
  Revert "Try to workaround Java's poor OS X mixer"
  Try to workaround Java's poor OS X mixer
  Move audio buffering responsibility onto us and simply fill whatever the runtime gives us

Conflicts:
	src/com/limelight/Limelight.java
	src/com/limelight/binding/audio/JavaxAudioRenderer.java
	src/com/limelight/gui/StreamFrame.java
This commit is contained in:
Diego Waxemberg
2013-12-29 13:24:22 -05:00
13 changed files with 363 additions and 55 deletions

View File

@@ -1,14 +1,12 @@
package com.limelight;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import com.limelight.binding.LibraryHelper;
import com.limelight.binding.PlatformBinding;
import com.limelight.gui.MainFrame;
import com.limelight.gui.StreamFrame;
@@ -33,7 +31,7 @@ public class Limelight implements NvConnectionListener {
private String host;
private StreamFrame streamFrame;
private NvConnection conn;
private boolean connectionFailed;
private boolean connectionTerminating;
private static JFrame limeFrame;
/**
@@ -189,14 +187,15 @@ public class Limelight implements NvConnectionListener {
}
}
try {
prepareNativeLibraries();
} catch (IOException e) {
// This is expected to fail when not in a JAR
}
LibraryHelper.prepareNativeLibraries();
createFrame();
}
public void stop() {
connectionTerminating = true;
conn.stop();
}
/**
* Callback to specify which stage is starting. Used to update UI.
@@ -244,9 +243,11 @@ public class Limelight implements NvConnectionListener {
*/
@Override
public void connectionTerminated(Exception e) {
e.printStackTrace();
if (!connectionFailed) {
connectionFailed = true;
if (!(e instanceof InterruptedException)) {
e.printStackTrace();
}
if (!connectionTerminating) {
connectionTerminating = true;
// Kill the connection to the target
conn.stop();