mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 02:20:55 +00:00
Added in a GUI to allow custom IP (because fuck MDNS)
This commit is contained in:
0
.metadata/.lock
Normal file
0
.metadata/.lock
Normal file
2
.metadata/.plugins/org.eclipse.cdt.core/.log
Normal file
2
.metadata/.plugins/org.eclipse.cdt.core/.log
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*** SESSION Sep 21, 2013 18:55:11.17 -------------------------------------------
|
||||||
|
*** SESSION Sep 21, 2013 18:55:55.08 -------------------------------------------
|
||||||
1
.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
Normal file
1
.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
Normal file
1
.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
BIN
.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
Normal file
BIN
.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
|||||||
|
com.android.ide.eclipse.adt.fixLegacyEditors=1
|
||||||
|
com.android.ide.eclipse.adt.sdk=C\:\\Users\\Andrew\\Desktop\\ADT\\adt-bundle-windows-x86_64-20130917\\sdk
|
||||||
|
eclipse.preferences.version=1
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
spelling_locale_initialized=true
|
||||||
|
useAnnotationsPrefPage=true
|
||||||
|
useQuickDiffPrefPage=true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
content_assist_proposals_background=255,255,255
|
||||||
|
content_assist_proposals_foreground=0,0,0
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
fontPropagated=true
|
||||||
|
org.eclipse.jdt.ui.editor.tab.width=
|
||||||
|
org.eclipse.jdt.ui.formatterprofiles.version=12
|
||||||
|
org.eclipse.jdt.ui.javadoclocations.migrated=true
|
||||||
|
org.eclipse.jface.textfont=1|Courier New|10.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Courier New;
|
||||||
|
proposalOrderMigrated=true
|
||||||
|
spelling_locale_initialized=true
|
||||||
|
tabWidthPropagated=true
|
||||||
|
useAnnotationsPrefPage=true
|
||||||
|
useQuickDiffPrefPage=true
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
PROBLEMS_FILTERS_MIGRATE=true
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
platformState=1379804095671
|
||||||
|
quickStart=false
|
||||||
|
tipsAndTricks=true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
showIntro=false
|
||||||
2015
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Normal file
2015
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Normal file
File diff suppressed because it is too large
Load Diff
BIN
.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache
Normal file
BIN
.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache
Normal file
Binary file not shown.
BIN
.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
Normal file
BIN
.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<typeInfoHistroy/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<qualifiedTypeNameHistroy/>
|
||||||
12
.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
Normal file
12
.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<section name="Workbench">
|
||||||
|
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
|
||||||
|
<item value="true" key="group_libraries"/>
|
||||||
|
<item value="false" key="linkWithEditor"/>
|
||||||
|
<item value="2" key="layout"/>
|
||||||
|
<item value="1" key="rootMode"/>
|
||||||
|
<item value="<?xml version="1.0" encoding="UTF-8"?>
<packageExplorer group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="">
<customFilters userDefinedPatternsEnabled="false">
<xmlDefinedFilters>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
</xmlDefinedFilters>
</customFilters>
</packageExplorer>" key="memento"/>
|
||||||
|
</section>
|
||||||
|
<section name="JavaElementSearchActions">
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
15
.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
Normal file
15
.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<section name="Workbench">
|
||||||
|
<section name="ChooseWorkspaceDialogSettings">
|
||||||
|
<item value="185" key="DIALOG_Y_ORIGIN"/>
|
||||||
|
<item value="381" key="DIALOG_X_ORIGIN"/>
|
||||||
|
</section>
|
||||||
|
<section name="WORKBENCH_SETTINGS">
|
||||||
|
<list key="ENABLED_TRANSFERS">
|
||||||
|
</list>
|
||||||
|
</section>
|
||||||
|
<section name="ExternalProjectImportWizard">
|
||||||
|
<item value="false" key="WizardProjectsImportPage.STORE_ARCHIVE_SELECTED"/>
|
||||||
|
<item value="false" key="WizardProjectsImportPage.STORE_COPY_PROJECT_ID"/>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<section name="Workbench">
|
||||||
|
<section name="org.eclipse.ui.internal.QuickAccess">
|
||||||
|
<item value="1025" key="dialogWidth"/>
|
||||||
|
<item value="525" key="dialogHeight"/>
|
||||||
|
<list key="orderedProviders">
|
||||||
|
</list>
|
||||||
|
<list key="textArray">
|
||||||
|
</list>
|
||||||
|
<list key="orderedElements">
|
||||||
|
</list>
|
||||||
|
<list key="textEntries">
|
||||||
|
</list>
|
||||||
|
</section>
|
||||||
|
<section name="ImportExportAction">
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<workingSetManager>
|
||||||
|
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1379804109849_0" label="Window Working Set" name="Aggregate for window 1379804109848"/>
|
||||||
|
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1379804153983_1" label="Window Working Set" name="Aggregate for window 1379804153983"/>
|
||||||
|
</workingSetManager>
|
||||||
1
.metadata/version.ini
Normal file
1
.metadata/version.ini
Normal file
@@ -0,0 +1 @@
|
|||||||
|
org.eclipse.core.runtime=1
|
||||||
@@ -35,7 +35,10 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
|
|||||||
public static final int ic_launcher=0x7f020000;
|
public static final int ic_launcher=0x7f020000;
|
||||||
}
|
}
|
||||||
public static final class id {
|
public static final class id {
|
||||||
public static final int videoView=0x7f080000;
|
public static final int editText1=0x7f080002;
|
||||||
|
public static final int hostTextView=0x7f080000;
|
||||||
|
public static final int statusButton=0x7f080001;
|
||||||
|
public static final int videoView=0x7f080003;
|
||||||
}
|
}
|
||||||
public static final class layout {
|
public static final class layout {
|
||||||
public static final int activity_connection=0x7f030000;
|
public static final int activity_connection=0x7f030000;
|
||||||
@@ -110,7 +113,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
|
|||||||
|
|
||||||
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
|
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
|
||||||
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
|
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
|
||||||
@attr name android:buttonBarButtonStyle
|
@attr name com.limelight:buttonBarButtonStyle
|
||||||
*/
|
*/
|
||||||
public static final int ButtonBarContainerTheme_buttonBarButtonStyle = 1;
|
public static final int ButtonBarContainerTheme_buttonBarButtonStyle = 1;
|
||||||
/**
|
/**
|
||||||
@@ -120,7 +123,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
|
|||||||
|
|
||||||
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
|
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
|
||||||
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
|
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
|
||||||
@attr name android:buttonBarStyle
|
@attr name com.limelight:buttonBarStyle
|
||||||
*/
|
*/
|
||||||
public static final int ButtonBarContainerTheme_buttonBarStyle = 0;
|
public static final int ButtonBarContainerTheme_buttonBarStyle = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
BIN
libs/dnsjava-2.1.5.jar
Normal file
BIN
libs/dnsjava-2.1.5.jar
Normal file
Binary file not shown.
@@ -8,4 +8,28 @@
|
|||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
tools:context=".Connection" >
|
tools:context=".Connection" >
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/hostTextView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="255.255.255.255"
|
||||||
|
android:textSize="100dp" >
|
||||||
|
|
||||||
|
<requestFocus />
|
||||||
|
</EditText>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/statusButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/editText1"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="131dp"
|
||||||
|
android:text="Start Streaming Steam!"
|
||||||
|
android:textSize="50dp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -7,21 +7,59 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||||||
import com.limelight.nvstream.NvConnection;
|
import com.limelight.nvstream.NvConnection;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.View.OnClickListener;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
public class Connection extends Activity {
|
public class Connection extends Activity {
|
||||||
|
private Button statusButton;
|
||||||
|
private TextView hostText;
|
||||||
|
private SharedPreferences prefs;
|
||||||
|
|
||||||
|
private static final String DEFAULT_HOST = "141.213.191.238";
|
||||||
|
public static final String HOST_KEY = "hostText";
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
|
||||||
|
editor.putString(this.HOST_KEY, this.hostText.toString());
|
||||||
|
editor.apply();
|
||||||
|
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_connection);
|
setContentView(R.layout.activity_connection);
|
||||||
|
|
||||||
new Thread(new Runnable() {
|
|
||||||
|
this.statusButton = (Button) findViewById(R.id.statusButton);
|
||||||
|
this.hostText = (TextView) findViewById(R.id.hostTextView);
|
||||||
|
|
||||||
|
prefs = getPreferences(0);
|
||||||
|
this.hostText.setText(prefs.getString(this.HOST_KEY, this.DEFAULT_HOST));
|
||||||
|
|
||||||
|
this.statusButton.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void onClick(View arg0) {
|
||||||
try {
|
try {
|
||||||
new NvConnection("141.213.191.238").doShit();
|
new NvConnection(Connection.this.statusButton.getText().toString()).doShit();
|
||||||
} catch (XmlPullParserException e) {
|
} catch (XmlPullParserException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -31,7 +69,7 @@ public class Connection extends Activity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}).start();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
27
src/com/limelight/nvstream/NvMDNS.java
Normal file
27
src/com/limelight/nvstream/NvMDNS.java
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package com.limelight.nvstream;
|
||||||
|
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
|
public class NvMDNS {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static String NVSTREAM_MDNS_QUERY = "_nvstream._tcp.local.";
|
||||||
|
public static final short MDNS_PORT = 5353;
|
||||||
|
public static final int REPLY_TIMEOUT = 3000;
|
||||||
|
public static final int REPLY_TRIES = 10;
|
||||||
|
public static InetAddress MDNS_ADDRESS;
|
||||||
|
|
||||||
|
static {
|
||||||
|
try {
|
||||||
|
// 224.0.0.251 is the mDNS multicast address
|
||||||
|
MDNS_ADDRESS = InetAddress.getByName("224.0.0.251");
|
||||||
|
} catch (UnknownHostException e) {
|
||||||
|
MDNS_ADDRESS = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Implement this shit
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user