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

@@ -40,23 +40,15 @@ public class SwingCpuDecoderRenderer implements VideoDecoderRenderer {
* @param drFlags flags for the decoder and renderer
*/
@Override
public void setup(int width, int height, Object renderTarget, int drFlags) {
this.targetFps = 30;
public void setup(int width, int height, int redrawRate, Object renderTarget, int drFlags) {
this.targetFps = redrawRate;
this.width = width;
this.height = height;
// Single threaded low latency decode is ideal
int avcFlags = AvcDecoder.LOW_LATENCY_DECODE;
int threadCount = 1;
// Hack to work around the bad Java native library loader
// which can't resolve native library dependencies
if (System.getProperty("os.name").contains("Windows")) {
System.loadLibrary("avutil-52");
System.loadLibrary("postproc-52");
System.loadLibrary("pthreadVC2");
}
int err = AvcDecoder.init(width, height, avcFlags, threadCount);
if (err != 0) {
throw new IllegalStateException("AVC decoder initialization failure: "+err);