Remove most NVIDIA-specific references in code

This commit is contained in:
Cameron Gutman
2023-02-11 14:25:54 -06:00
parent 1aa963992b
commit 1b9dff719c
6 changed files with 29 additions and 29 deletions

View File

@@ -412,7 +412,8 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
// Spin the dialog off in a thread because it blocks
Dialog.displayDialog(PcView.this, getResources().getString(R.string.pair_pairing_title),
getResources().getString(R.string.pair_pairing_msg)+" "+pinStr, false);
getResources().getString(R.string.pair_pairing_msg)+" "+pinStr+"\n\n"+
getResources().getString(R.string.pair_pairing_help), false);
PairingManager pm = httpConn.getPairingManager();

View File

@@ -15,7 +15,6 @@ import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
@@ -33,7 +32,7 @@ import com.limelight.LimeLog;
import com.limelight.nvstream.av.audio.AudioRenderer;
import com.limelight.nvstream.av.video.VideoDecoderRenderer;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.GfeHttpResponseException;
import com.limelight.nvstream.http.HostHttpResponseException;
import com.limelight.nvstream.http.LimelightCryptoProvider;
import com.limelight.nvstream.http.NvApp;
import com.limelight.nvstream.http.NvHTTP;
@@ -345,7 +344,7 @@ public class NvConnection {
} else {
return quitAndLaunch(h, context);
}
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
if (e.getErrorCode() == 470) {
// This is the error you get when you try to resume a session that's not yours.
// Because this is fairly common, we'll display a more detailed message.
@@ -378,7 +377,7 @@ public class NvConnection {
context.connListener.displayMessage("Failed to quit previous session! You must quit it manually");
return false;
}
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
if (e.getErrorCode() == 599) {
context.connListener.displayMessage("This session wasn't started by this device," +
" so it cannot be quit. End streaming on the original " +
@@ -423,7 +422,7 @@ public class NvConnection {
return;
}
context.connListener.stageComplete(appName);
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
e.printStackTrace();
context.connListener.displayMessage(e.getMessage());
context.connListener.stageFailed(appName, 0, e.getErrorCode());

View File

@@ -2,13 +2,13 @@ package com.limelight.nvstream.http;
import java.io.IOException;
public class GfeHttpResponseException extends IOException {
public class HostHttpResponseException extends IOException {
private static final long serialVersionUID = 1543508830807804222L;
private int errorCode;
private String errorMsg;
public GfeHttpResponseException(int errorCode, String errorMsg) {
public HostHttpResponseException(int errorCode, String errorMsg) {
this.errorCode = errorCode;
this.errorMsg = errorMsg;
}
@@ -23,6 +23,6 @@ public class GfeHttpResponseException extends IOException {
@Override
public String getMessage() {
return "GeForce Experience returned error: "+errorMsg+" (Error code: "+errorCode+")";
return "Host PC returned error: "+errorMsg+" (Error code: "+errorCode+")";
}
}

View File

@@ -266,7 +266,7 @@ public class NvHTTP {
return getXmlString(new StringReader(str), tagname, throwIfMissing);
}
private static void verifyResponseStatus(XmlPullParser xpp) throws GfeHttpResponseException {
private static void verifyResponseStatus(XmlPullParser xpp) throws HostHttpResponseException {
// We use Long.parseLong() because in rare cases GFE can send back a status code of
// 0xFFFFFFFF, which will cause Integer.parseInt() to throw a NumberFormatException due
// to exceeding Integer.MAX_VALUE. We'll get the desired error code of -1 by just casting
@@ -280,7 +280,7 @@ public class NvHTTP {
statusCode = 418;
statusMsg = "Missing audio capture device. Reinstall GeForce Experience.";
}
throw new GfeHttpResponseException(statusCode, statusMsg);
throw new HostHttpResponseException(statusCode, statusMsg);
}
}
@@ -306,7 +306,7 @@ public class NvHTTP {
if (e.getCause() instanceof CertificateException) {
// Jump to the GfeHttpResponseException exception handler to retry
// over HTTP which will allow us to pair again to update the cert
throw new GfeHttpResponseException(401, "Server certificate mismatch");
throw new HostHttpResponseException(401, "Server certificate mismatch");
}
else {
throw e;
@@ -317,7 +317,7 @@ public class NvHTTP {
// We want this because it will throw us into the HTTP case if the client is unpaired.
getServerVersion(resp);
}
catch (GfeHttpResponseException e) {
catch (HostHttpResponseException e) {
if (e.getErrorCode() == 401) {
// Cert validation error - fall back to HTTP
return openHttpConnectionToString(client, baseUrlHttp, "serverinfo");
@@ -435,7 +435,7 @@ public class NvHTTP {
throw new FileNotFoundException(completeUrl.toString());
}
else {
throw new GfeHttpResponseException(response.code(), response.message());
throw new HostHttpResponseException(response.code(), response.message());
}
}
@@ -669,7 +669,7 @@ public class NvHTTP {
return openHttpConnectionToString(httpClientLongConnectTimeout, getHttpsUrl(true), "applist");
}
public LinkedList<NvApp> getAppList() throws GfeHttpResponseException, IOException, XmlPullParserException {
public LinkedList<NvApp> getAppList() throws HostHttpResponseException, IOException, XmlPullParserException {
if (verbose) {
// Use the raw function so the app list is printed
return getAppListByReader(new StringReader(getAppListRaw()));
@@ -681,12 +681,12 @@ public class NvHTTP {
}
}
String executePairingCommand(String additionalArguments, boolean enableReadTimeout) throws GfeHttpResponseException, IOException {
String executePairingCommand(String additionalArguments, boolean enableReadTimeout) throws HostHttpResponseException, IOException {
return openHttpConnectionToString(enableReadTimeout ? httpClientLongConnectTimeout : httpClientLongConnectNoReadTimeout,
baseUrlHttp, "pair", "devicename=roth&updateState=1&" + additionalArguments);
}
String executePairingChallenge() throws GfeHttpResponseException, IOException {
String executePairingChallenge() throws HostHttpResponseException, IOException {
return openHttpConnectionToString(httpClientLongConnectTimeout, getHttpsUrl(true),
"pair", "devicename=roth&updateState=1&phrase=pairchallenge");
}
@@ -798,7 +798,7 @@ public class NvHTTP {
if (getCurrentGame(getServerInfo(true)) != 0) {
// Generate a synthetic GfeResponseException letting the caller know
// that they can't kill someone else's stream.
throw new GfeHttpResponseException(599, "");
throw new HostHttpResponseException(599, "");
}
return true;

View File

@@ -6,13 +6,12 @@ import android.widget.Toast;
import com.limelight.AppView;
import com.limelight.Game;
import com.limelight.PcView;
import com.limelight.R;
import com.limelight.ShortcutTrampoline;
import com.limelight.binding.PlatformBinding;
import com.limelight.computers.ComputerManagerService;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.GfeHttpResponseException;
import com.limelight.nvstream.http.HostHttpResponseException;
import com.limelight.nvstream.http.NvApp;
import com.limelight.nvstream.http.NvHTTP;
import com.limelight.nvstream.jni.MoonBridge;
@@ -135,7 +134,7 @@ public class ServerHelper {
} else {
message = parent.getResources().getString(R.string.applist_quit_fail) + " " + app.getAppName();
}
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
if (e.getErrorCode() == 599) {
message = "This session wasn't started by this device," +
" so it cannot be quit. End streaming on the original " +

View File

@@ -25,7 +25,7 @@
<!-- Network test strings -->
<string name="nettest_title_waiting">Testing Network Connection</string>
<string name="nettest_text_waiting">Moonlight is testing your network connection to determine if NVIDIA GameStream is blocked.\n\nThis may take a few seconds…</string>
<string name="nettest_text_waiting">Moonlight is testing your network connection to determine if any required ports are blocked.\n\nThis may take a few seconds…</string>
<string name="nettest_title_done">Network Test Complete</string>
<string name="nettest_text_success">Your network does not appear to be blocking Moonlight. If you still have trouble connecting, check your PC\'s firewall settings.\n\nIf you are trying to stream over the Internet, install the Moonlight Internet Hosting Tool on your PC and run the included Internet Streaming Tester to check your PC\'s Internet connection.</string>
<string name="nettest_text_inconclusive">The network test could not be performed because none of Moonlight\'s connection testing servers were reachable. Check your Internet connection or try again later.</string>
@@ -38,13 +38,14 @@
<string name="pair_pc_ingame">Computer is currently in a game. You must close the game before pairing.</string>
<string name="pair_pairing_title">Pairing</string>
<string name="pair_pairing_msg">Please enter the following PIN on the target PC:</string>
<string name="pair_pairing_help">If your host PC is running Sunshine, navigate to the Sunshine web UI to enter the PIN.</string>
<string name="pair_incorrect_pin">Incorrect PIN</string>
<string name="pair_fail">Pairing failed</string>
<string name="pair_already_in_progress">Pairing already in progress</string>
<!-- WOL messages -->
<string name="wol_pc_online">Computer is online</string>
<string name="wol_no_mac">Unable to wake PC because GFE didn\'t send a MAC address</string>
<string name="wol_no_mac">Unable to wake PC because there is no stored MAC address</string>
<string name="wol_waking_pc">Waking PC…</string>
<string name="wol_waking_msg">It may take a few seconds for your PC to wake up.
If it doesn\'t, make sure it\'s configured properly for Wake-On-LAN.
@@ -65,7 +66,7 @@
Using remote desktop software can also cause this error. Try rebooting your machine or reinstalling GFE.
</string>
<string name="title_decoding_error">Video Decoder Crashed</string>
<string name="message_decoding_error">Moonlight has crashed due to an incompatibility with this device\'s video decoder. Ensure GeForce Experience is updated to the latest version on your PC. Try adjusting the streaming settings if the crashes continue.</string>
<string name="message_decoding_error">Moonlight has crashed due to an incompatibility with this device\'s video decoder. Try adjusting the streaming settings if the crashes continue.</string>
<string name="title_decoding_reset">Video Settings Reset</string>
<string name="message_decoding_reset">Your device\'s video decoder continues to crash at your selected streaming settings. Your streaming settings have been reset to default.</string>
<string name="error_usb_prohibited">USB access is prohibited by your device administrator. Check your Knox or MDM settings.</string>
@@ -73,7 +74,7 @@
<string name="video_decoder_init_failed">Video decoder failed to initialize. Your device may not support the selected resolution or frame rate.</string>
<string name="no_video_received_error">No video received from host.</string>
<string name="no_frame_received_error">Your network connection isn\'t performing well. Reduce your video bitrate setting or try a faster connection.</string>
<string name="early_termination_error">Something went wrong on your host PC when starting the stream.\n\nMake sure you don\'t have any DRM-protected content open on your host PC. You can also try restarting your host PC.\n\nIf the issue persists, try reinstalling your GPU drivers and GeForce Experience.</string>
<string name="early_termination_error">Something went wrong on your host PC when starting the stream.\n\nMake sure you don\'t have any DRM-protected content open on your host PC. You can also try restarting your host PC.</string>
<string name="frame_conversion_error">The host PC reported a fatal video encoding error.\n\nTry disabling HDR mode, changing the streaming resolution, or changing your host PC\'s display resolution.</string>
<string name="check_ports_msg">Check your firewall and port forwarding rules for port(s):</string>
@@ -91,9 +92,9 @@
<string name="conn_terminated_msg">The connection was terminated</string>
<!-- General strings -->
<string name="ip_hint">IP address of GeForce PC</string>
<string name="searching_pc">Searching for PCs with GameStream running…\n\n
Ensure GameStream is enabled in the GeForce Experience SHIELD settings.</string>
<string name="ip_hint">IP address of host PC</string>
<string name="searching_pc">Searching for host PCs on your local network…\n\n
Ensure Sunshine is running on your host PC or GameStream is enabled in the GeForce Experience SHIELD settings.</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="lost_connection">Lost connection to PC</string>
@@ -228,7 +229,7 @@
<string name="title_video_format">Change HEVC settings</string>
<string name="summary_video_format">HEVC lowers video bandwidth requirements but requires a newer device</string>
<string name="title_enable_hdr">Enable HDR (Experimental)</string>
<string name="summary_enable_hdr">Stream HDR when the game and PC GPU support it. HDR requires a GTX 1000 series GPU or later.</string>
<string name="summary_enable_hdr">Stream HDR when the game and PC GPU support it. HDR requires a GPU with HEVC Main 10 encoding support.</string>
<string name="title_full_range">Force full range video (Experimental)</string>
<string name="summary_full_range">This will cause loss of detail in light and dark areas if your device doesn\'t properly display full range video content.</string>
<string name="title_enable_perf_overlay">Show performance stats while streaming</string>